|
-
Oct 12th, 2003, 10:22 PM
#1
Thread Starter
Member
How to do this....
I have met some trouble......
a program insert some record to DB like this
ID,Num,Weight,Date,Signer....
, then print it together, I filter it by Date,SQL like this
SELECT * FROM shipment WHERE date BETWEEN '2003-10-10' AND '2003-10-11'
but my boss tell me: I need select ID by myself. so I have to filer it by ID, But the report need a lot of ID,how can I do? I must use the SQL like this??????
SELECT * FROM shipment WHERE ID = 1 or ID = 2 or ID = 3.....??
thanks......
-
Oct 12th, 2003, 10:27 PM
#2
Hyperactive Member
Re: How to do this....
Try something like this:
Select * from shipment where ID In (1,2,3,4)
-
Oct 12th, 2003, 11:55 PM
#3
Thread Starter
Member
if I have 100 or more record.........
-
Oct 13th, 2003, 12:39 AM
#4
select * from shipment where id between 1 and 100
-
Oct 13th, 2003, 02:08 AM
#5
Thread Starter
Member
Can I have an other way to do.
I think maybe I can create a temporary table to do .....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|