Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating table

Status
Not open for further replies.

cancer2006

Programmer
Aug 25, 2006
45
US
SELECT co, id, 0.0 AS currGross, 0.0 AS eePercent,
0.0 AS currEePreTax, 0.0 AS currEePostTax,
0.0 AS currEeLoan, er401KMatch AS erPercent,
0.0 AS currErMatch, 0.0 AS ytdGross,
0.0 AS ytdEePreTax, 0.0 AS ytdEePostTax,
0.0 AS ytdEeLoan, 0.0 AS ytdErMatch
INTO temp
FROM Company;


I am not sure,about couple of things in the above statement.?
1. what is AS
2. currGross, eePercent, currEePreTax and so on.

This statement is creating a new table called temp and extracting co and id field data from Company table. also initializing currGross, eePercent, currEePreTax and other fields with 0.0.

So the end result in temp table will be like
temp.co = 9999
temp.id = 1111
temp.eePercent = 0.0
temp.currEePreTax = 0.0

Correct me if I am wrong?
Thanks
 
1. what is AS
AS is used to assign a name the field/column in the maketable query
2. currGross, eePercent, currEePreTax and so on.
These are the derived field names.


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top