User Tools

Site Tools


prop_alias.htm
Navigation:  SQL Driver Properties(General) >====== PROP:Alias ====== Previous pageReturn to chapter overviewNext page

PROP:Alias is a read/write file property that sets or returns the alias the SQL Accelerator driver uses when generating SELECT statements for a view. It will return an empty string if PROP:Alias has not previously been called to set the alias. PROP:Alias only returns a value previously set using PROP:Alias. For example:

Customer{PROP:Alias} = 'C'                !set new table alias

OldAlias“ = Customer{PROP:Alias} = ''     !use default alias

If you have not used PROP:Alias to set the alias of a file, the SQL driver generates an SQL statement which uses an Alias of “A” for the first file in the View, “B” for the second etc. If you wish to use the SQL() directive in Prop:Filter, your filter has to be compatible with the previously generated SQL statement ' e.g., you need use A/B/etc. as the file prefixes.

Setting a file's property will set it for as long as that file is in scope. For non-threaded files this means for the duration of the program. For threaded files it means for the duration of the thread.

You can use file{PROP:Alias} to specify what alias the driver should use when constructing SELECT statements for views.

If the file has the THREAD attribute, then it refers to the current thread. If it does not, then it is global.

See Also:     PROP:SQL

prop_alias.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1