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. ...

Get Microsoft® SQL Server™ 2000 Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.