Unanswered: view and print contents of query analyzer (was "Big time Newbe needs help")
Hello, I need some help, I am in school right now and I am in a SQL server class. We have been working in the query analizer making a database. Well I have to print out everything that I have typed. But I want to view it first. How do I do that?
Sorry I did a search and couldnt find anything.. Probably cause I dont really know what to search for or look under. Thanks for your guys time.
If you mean that you have run the SQL and no longer have it in the Query Analyser window and you want a script of the database etc then:-
Go to enterprise manager. Right click on any user table in your database and choose All Tasks/Generate SQL Script. This will bring up a window with 3 tabs. On the general tab click "show all", choose any tables etc you want to display the scripts for then go to the options tab and choose anything else you want to script. Check the formatting tab too to make sure you are not getting anything you don't want. I usually go back to the General tab and choose Preview and use copy and paste to get the info I want but you can save it to a file from the options tab.