Quote:
quote:Originally posted by badgolfer
How can I assign an 'alias' to my record set ?
Eg. using the following query
select item.id,item.name,item.price, stock.level from items
join stocks on item.id=stock.id where item.id > 2000
How can I set the resulting record set to be known as 'myResults' ?
|
add as at end of your select statement
select item.id,item.name,item.price, stock.level from items
join stocks on item.id=stock.id where item.id > 2000
as my results
[u]Documentation from help file</u>
setting
You can use a string expression (string expression: Any expression that evaluates to a sequence of contiguous characters. Elements of the expression can include: a function that returns a string or a string Variant (VarType 8); a string literal, constant, variable, or Variant</.) to set the Alias property to any name not currently being used in the database. You set this property in query Design view (Design view: A window that shows the design of these database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you can create new database objects and modify the design of existing ones.) by right-clicking the field list in the query design grid and clicking Properties.
You can set the Alias property in SQL view of the Query window by using an AS clause in the SQL statement.
Remarks