is it possible to use a variable in a query with the IN
clause (a,b,c..z), without getting quotes or conversion
errors?

Answers were Sorted based on User's Feedback



is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes ..

Answer / guest

You can use a variable as your IN clause, but this requires
that you use the EXEC function to run the statement.

Is This Answer Correct ?    2 Yes 1 No

is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes ..

Answer / kishor kumar

It is possible by using Dynamic SQL.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is deploy, process and build? : sql server analysis services, ssas

1 Answers  


Can you please explain the difference between primary keys and foreign keys?

1 Answers  


What is recompile sql server?

1 Answers  


Explain what are the restrictions that views have to follow? : SQL Server Architecture

1 Answers  


What is sql server locking?

1 Answers  


How would you use user_constraints table in DB?

1 Answers   Wipro,


What is an identity column in insert statements?

1 Answers  


Explain the properties of a relational table?

1 Answers  


What is the difference between Stored Procedures and triggers?

1 Answers   HCL,


How to list all tables in the database using odbc_tables()?

1 Answers  


Can you explain what are various ways to enhance the ssrs report?

1 Answers  


What is the datatype of rowid?

1 Answers  


Categories