dbForge Studio for SQL Server provides the SQL Formatter that enables you to format SQL code efficiently. It also supports bulk formatting that allows you to format multiple selected files or entire directories at once.
The following file will be formatted:
1. Open the SQL Formatter by navigating to the Tools menu and selecting SQL Formatter.
2. On the Formatting mode page of the wizard, the Files mode is selected by default. To proceed, select Next.
3. On the File list page, select Add to the select the files you want to format.
Tip
To remove the selected file from the list, select Remove.
4. To start formatting the file, select Format.
5. In the Connect to Server window that opens, select the connection and then select Connect.
6. In the pop-up window informating that the number of files have been formmated, select OK to close it.
7. If you’ve selected the Keep modified files open after formatting checkbox, the formatted files will open in a new SQL document after the formatting process is completed.
1. Open the SQL Formatter by navigating to the Tools menu and selecting SQL Formatter.
2. On the Formatting mode page of the wizard, select the Directories mode and then select Next.
3. On the Folder list page, select Add to the select the folder with the files you want to format:
Tip
To remove the selected folder, select Remove.
4. To start formatting the folder, select Format.
5. In the Connect to Server window that opens, select the connection and then select Connect.
6. In the pop-up window informating that the number of files have been formmated, select OK to close it.
7. If you’ve selected the Keep modified files open after formatting checkbox, the formatted files will open in a new SQL document after the formatting process is completed.
Note
Each formatted file opens in a new SQL document.
To save the formatted file, on the SQL toolbar, select Save As and save the file to the desired folder.