Server Management Studio Open File | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Server Management Studio Open File

Sorry for posting such a silly question, but for the life of me I cannot figure this one out. In Server Management Studio, when I have a Query tab open, how can I open a .sql file into the same area? In SQL 2000 you could simply do File >> Open and it would open the .sql file inside the same query window. In 2005 it puts the file into a new tab (window). Can we not open .sql files into the same work area?
As far I know is the way like MS works.
Luis Martin
Moderator
SQL-Server-Performance.com Although nature commences with reason and ends in experience it is necessary for us to do the opposite, that is to commence with experience and from this to proceed to investigate the reason.
Leonardo Da Vinci Nunca esperes el reconocimiento de tus hijos, eso ocurrirá luego de tu muerte
All postings are provided “AS IS” with no warranties for accuracy.
In SQL Server 2000 QA, when you open a file, it does not open it in the same query window. The name of the file replaces whatever you have in the background, usually "Untitled1" and prompts you to save any changes, if you have anything written in that window. You are probably seeing the "Untitled1" window being closed since it is not needed. In SQL Server 2005 MSSMS, you are given a tabular format to pick and choose your query windows along with the extra option of being connected to the database or not right from the start. If, however, you select "New Query", then that window will remain until the user actively chooses to close it. The window will not get "replaced" afterwards by opening your file. You can directly open your file without selecting the "New Query" option.

Tahsin, Right, but are you saying that there is no option or override to make it so that I can open a file inside that same area if I want to, and it will always create a new tab everytime I want to open a file?
Thanks
AFAIK, that’s correct. I thought there never was a way to do that in SQL2K either. What setting do you have enabled in SQL2K that is allowing you to paste the contents of a new file within the contents of an existing query window?

Tahsin, Maybe I didnt say this correctly, sorry. In sql 2k query anaylzer, open it up and connect to a db. Now you have an open query window. Next, choose file >> open, then choose a saved .sql file. The file will open in the same query window. In sql2005 it will not do this, and instead open another query window. I want it to open up inside same window. Can this be done ? Thanks
I can’t understand the real issue here.
In both cases 2000 or 2005, it opens in new place. 2005 it is tab oriented and 2000 it is window orentied. Do you want to change this?? —————————————-
http://spaces.msn.com/members/dineshasanka


Hi Dine, Actually Sql 2000 does not open in a new place. It opens right in the window you are working on at the time. At least in mine it does. So this would be a no then in 2005? Thanks
]]>