Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search table against variable list.

Status
Not open for further replies.

abenitez77

IS-IT--Management
Oct 18, 2007
147
US
I want to run a select command on a table against a value in a variable

Declare @TableNameHeader as varchar(100)
set @TableNameHeader = 'Header1,Header2,Header3'

Select * from nj_toys_claims.dbo.tblTables where TableName IN(@TableNameHeader)

I get no records returned and the 3 values exist in the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top