DECLARE @X VARCHAR(MAX)
DECLARE @y VARCHAR(MAX)
SET @X=(SELECT MARK FROM dbo.EMP3 WHERE ID =4)
SET @Y ='SELECT * FROM dbo.EMP3 WHERE ID1 IN ('+@X+')'
EXEC(@Y)
DECLARE @y VARCHAR(MAX)
SET @X=(SELECT MARK FROM dbo.EMP3 WHERE ID =4)
SET @Y ='SELECT * FROM dbo.EMP3 WHERE ID1 IN ('+@X+')'
EXEC(@Y)
No comments:
Post a Comment