Link to home
Start Free TrialLog in
Avatar of andyw27
andyw27

asked on

SQL Query - Multiple where clause

Hi,

I have an excel sheet contains about 300 rows of data.  I needs to run a SQL select query that extracts these 300 records from a table containsing 50k records. Obviously returning a single record would be easy to do, but I don’t know how to do it for so many?

Any pointers? – using SQL 2008.

TIA.
ASKER CERTIFIED SOLUTION
Avatar of Wasim Akram Shaik
Wasim Akram Shaik
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andyw27
andyw27

ASKER

cool, looks good.  Is there any way to expand this so that I can do it against two columns:

something like this:

select * from emp where deptno in(10 + col2 value ,20 + col2 value,30 + col2 value)
Avatar of andyw27

ASKER

Now sorted, just concatenated the two strings.