Select File>Save Query from the menu bar.
If you have previously saved the query, PowerBuilder saves the new version in the same library and returns you to the Query painter. If you have not previously saved the query, PowerBuilder displays the Save Query dialog box.
Enter a name for the query in the Queries box (see “Naming the query”).
(Optional) Enter comments to describe the query.
These comments display in the Library painter. It is a good idea to use comments to remind yourself and others of the purpose of the query.
Specify the library in which to save the query, and click OK.
The query name can be any valid PowerBuilder identifier up to 255 characters. When you name queries, use a unique name to identify each one. A common convention is to use a two-part name: a standard prefix that identifies the object as a query (such as q_) and a unique suffix. For example, you might name a query that displays employee data q_emp_data. For information about PowerBuilder identifiers, see the PowerScript Reference.