Inquiry Command
Return the names of columns to appear in the result table.
names SELECT_STATEMENT
SELECT_STATEMENT
An SQL select statement.
Description
This command causes the SQL executable to parse the select statement and deliver an informational message describing the name of each column that will appear in the result table. Qualified columns are described by their position within the select statement. The message has the form:
INFO_STRING NAME1 NAME2 ... NAMEn
This is useful when all columns in a table are selected using the "*" command in a select statement.
Use the SQL command "select count (*) from ..." to determine the number of records that will be in the results table for a given query.
Example
response to Names
send "names " QueryString "\n" to SQL
begin guarded
response to line "INFO: " from SQL
add to ReportWindow
insert input
leave block
end