Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the difference?
Message
From
06/09/1999 08:50:35
 
 
To
04/09/1999 14:43:27
Larry Long
ProgRes (Programming Resources)
Georgia, United States
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00261530
Message ID:
00261729
Views:
20
See inline

>In a stored proc, what would be the difference between the following statements?
>
>SELECT cretvalue="string value"

This statement will return a result set, 1 row, 1 column. The column heading will be 'cretvalue' and the data value will be 'string value'


>
>and
>
>SELECT @cretvalue="string value"

This is an assignment statement. The local variable @cretvalue will be assigned the value of "string value"

>
>and
>
>SELECT cretvalue as @cretvalue

I've never seen this syntax. I tried duplicating it using the following batch but SQL Server 7.0 kicks back and error

DECLARE @mike varchar(10)
SET @mike 'x'
SELECT 123 AS @mike

Is the stored procedure small enough that you could post it?

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform