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