Where is the SQL file template in Visual Studio 2010?

I see in the VS2010 Tools> Options dialog box, there is a section on how to format SQL:

PL / SQL Options

I work with a very large stored procedure on our server, which is not formatted at all. I thought it would be great to create a new SQL file in my project, copy and paste the text from the stored procedure there, and the text editor apply automatic formatting to all SQL.

When I call "Add> New Item" and get this dialog box, there seems to be no installed template with the extension .sql.

Add New Item Dialog

I see a SQL Server database template , but that is not what I need. LINQ to SQL Classes is not suitable.

, VS2010?

+4
3

, # (, dll). .sql, #.

:

  • VS2010 → → . "" SqlFile. enter image description here

  • .

  • → . *.*, .sql .

  • . " " " ", , .

+6

, , SQL Server.

> >

Add SQL Project

, , , :

Options

* , VS2012 - , .

+1

Visual Studio T-SQL, SQL. .sql Management Studio.

.sql VS. " " ""

" " "explorer.exe" , , Management Studio

""

Highlight a new entry and select Set as Default.

Now, by double-clicking any .sql file in VS, any program will open when you double-click the .sql file outside of VS. Using this method, I can edit, add and modify my SQL files in the management studio and without any problems save them back to the project.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1528782/


All Articles