|
Posted by Alexander Kuznetsov on 07/31/06 16:02
Jim,
In addition to Erland's remark, note that the settings during a stored
procedure's execution are the settings in effect during its creation:
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE T1
@C1 CHAR(1), @C2 CHAR(1)
AS
SELECT CASE WHEN @C1 = @C2 THEN 'Inside SP: Equal' ELSE 'Inside SP: Not
Equal' END
GO
SET ANSI_NULLS ON
GO
GO
DECLARE @C1 CHAR(1), @C2 CHAR(1)
SELECT CASE WHEN @C1 = @C2 THEN 'Outside SP: Equal' ELSE 'Outside SP:
Not Equal' END
EXEC T1 @c1, @c2
GO
DROP PROCEDURE T1
GO
---------------------
Outside SP: Not Equal
(1 row(s) affected)
--------------------
Inside SP: Equal
(1 row(s) affected)
Navigation:
[Reply to this message]
|