Query Save Help

  • Hi Guys,

    I google but couldn't any find help. Here is the issue.

    From SSMS if I want to save any sql to .sql from File==>Save SqlQuery.Sql==>ask destination where I am gonna save and at last hit OK. It should save my Query in .SQL, right? for some reason its saving my query as .txt. Is anyone can help me why he doing this or which option do I have to change.

    Thank You....

  • rocky_498 (8/27/2013)


    Hi Guys,

    I google but couldn't any find help. Here is the issue.

    From SSMS if I want to save any sql to .sql from File==>Save SqlQuery.Sql==>ask destination where I am gonna save and at last hit OK. It should save my Query in .SQL, right? for some reason its saving my query as .txt. Is anyone can help me why he doing this or which option do I have to change.

    Thank You....

    It is just like any other application that uses the common dialog for saving a file. You can specify the type in the second dropdown. My guess is you have .txt as the selected type. Change that to .sql if you want to save as that type.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • When you do the save, have you checked to make sure the file type under the filename in the save as dialogue is .SQL and not .TXT ?

  • I tried to force to save in .sql but still saving in .txt file..., you are right i have third party software "ApexSQL" in my machine.. I am going to re install and install it again to see if there is any default file option during installation..

    Thank You...

  • Jason, Yes For sure its a SQL File "Save as type" (Good catch)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply