If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > select * from where Productid in (.......), please

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-08, 23:24
lung lung is offline
Registered User
 
Join Date: Aug 2008
Posts: 28
select * from where Productid in (.......), please

select * from where Productid in (1,2,3,4,5,6...)


if productid in (1 - 6)

it can do

but i don't know

if productid in (1-3000)

do it can?
Reply With Quote
  #2 (permalink)  
Old 12-18-08, 02:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
... WHERE Productid BETWEEN 1 AND 3000
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-18-08, 04:02
lung lung is offline
Registered User
 
Join Date: Aug 2008
Posts: 28
thanks sir

sorry
i mean
select * from .. where productid in (1,5,12,469,4876,4543438,4343439,5651,1487845,4456 6.........................)
(10000 number)

do it can? or is it error?
Reply With Quote
  #4 (permalink)  
Old 12-18-08, 04:17
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
why not try it and see for yourself?
what's the worst that can happen if it doesn't work?

in the 5 hours that has elapsed since you first asked the question you coudl have satisfied yourself of the anser to this long long ago, probably 4 hours and 55 minutes ago
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 12-18-08, 04:24
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Where do these specific product ids come from? If it's another SELECT statement then you have better options than the IN operator .
__________________
George
Twitter | Blog
Reply With Quote
  #6 (permalink)  
Old 12-18-08, 20:41
lung lung is offline
Registered User
 
Join Date: Aug 2008
Posts: 28
That Right..!

OK Thank you very much...

I'll try to do it first if it isn't work , I'll post here again
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On