O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining and Using Templates for Query Analyzer

To help in the writing of repetitive queries, SQL Query Analyzer provides templates. These are scripts, saved in the directory Templates/SQL Query Analyzer, with special directives to SQL Query Analyzer to accept template parameters.

To define a new template, write your script as usual and save it with the .tql extension in the SQL Query Analyzer templates directory (it is C:\Program Files\Microsoft SQL Server\80\Tools\Templates\SQL Query Analyzer by default).

To use a template, you can use the templates pane of the Object Browser or the Edit, Insert template menu. Whichever one you use, the template will be inserted in the Editor pane. Figure B.20 shows the Templates pane of the Object Browser. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required