November 10, 2005 at 4:28 pm
Hi again.
With the following syntax in a SP, I get an error that @TableName must be declared:
=================================
CREATE PROCEDURE usp_Table_Insert
@SecondaryKeyValue int
, @EmpName varchar(150)
, @PrimaryKeyValue int OUTPUT
, @ctlFKeyValue int
, @TableName varchar(50)
, @PrimaryKeyName varchar(100)
, @SecondaryKeyName varchar(100)
AS
IF EXISTS
( SELECT
@PrimaryKeyName
FROM @TableName
WHERE @SecondaryKeyName = @SecondaryKeyValue
 
RETURN
=================================
It looks to me like it's declared. What am I missing?
November 11, 2005 at 7:05 am
thanks again!!
Sam
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply