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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select field1, field2 + var1 2

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
0
0
US
Hi:

I need some help modifying the following select statement.

Select fl, f2, f3, f4, f5 from tab1 into table tmptable

Now in addition to the above fields I want to add a global variable to the select statement that'll have the same value for all the records.

How should I go about this?
 
Or:

Select fl,f2,f3,f4,f5, '33' as f6 from tab1 into table tmptable
Dave S.
 
What if the field I am trying to add has a numeric datatype.
 
Select fl,f2,f3,f4,f5, int(val('33')) as f6 from tab1 into table tmptable
 
Or:
Select fl,f2,f3,f4,f5, 33 as f6 from tab1 into table tmptable
Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top