When you use AS, you are aliasing column names. INTO puts the selected
column into a variable.
Example 1, I want get the quantity of something and put it in a var
set var vtotal int = 0
select count (*) into vtotal from sometable where ....
Example 2, I want to do quick report using a select and total widgets, but I
want meaningful col headings:
select t1.client, (sum(t2.widgets))=s as my_client, total_widgets from
clients t1, widgets_sold t2 where t1.client_id = t2.client_id group by
client
Troy
===== Original Message from [EMAIL PROTECTED] at 9/25/01 7:41 am
>Could you please explain the difference between AS and INTO in a select
>command.
>
>Also in a previous post someone mentioned a function GETCLIP (to get data
>from the windows clipboard). I cannot find the syntax for that at
>R.Syntax.com.
>
>Bernie Lis
>
>> name all columns AS ALIAS name(s).
>>
>> Example:
>>
>> DROP VIEW Maximum
>> CREATE VIEW tMaximum AS SELECT (MAX(CHARGE)) AS MaximumCharge +
>> FROM TableName ...
>>
>> For more details and examples on CREATE VIEW: http://www.RSyntax.com
>>
>> Have Fun!
>>
>> Very Best Regards,
>>
>> Razzak.
>>
>> ===================================-============================
>> R:BASE Developers's Conference: http://www.rbase.com/conference
>> Official R:BASE List Server: mailto:[EMAIL PROTECTED]
>> RBTI Events/Training: http://www.rbase2000.com/events
>> R:DCC Members: http://www.rbase2000.com/rdcc
>> ================================================================
>> R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
>> ==================================-=============================