[thelist] Stored Procedure Problem (EXEC)
Ken Schaefer
ken at adOpenStatic.com
Wed Dec 4 23:30:01 CST 2002
Look in Books Online for correct usage of Execute when you are not calling a
sproc :-)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Shaun Anderson" <shaunanderson at shaunanderson.info>
Subject: [thelist] Stored Procedure Problem (EXEC)
: --
: [ Picked text/plain from multipart/alternative ]
: I've got the following SP (Warning: I'm a SP Newbie):
:
: --------------------------------------------------------------------------
-
: CREATE PROCEDURE sp_CMSFormsSegments
: @Category int,
: @Language varchar(100)
:
: AS
: DECLARE @ExecCode varchar(8000)
:
: SELECT @ExecCode = 'SELECT tblCMSFormsSegments_ID AS SegID, ' + @Language
+ ' AS TheText FROM tblCMSFormsSegments Segs INNER JOIN tblCMSTranslations
Trans ON Segs.tblCMSTranslations_ID = Trans.tblCMSTranslations_ID WHERE
Category = ' + CAST (@Category AS VARCHAR)
: -- EXEC @ExecCode
: PRINT @ExecCode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the thelist
mailing list