December 6th, 2003, 04:31 AM
How do i get same data sting in a same tabe with diffrent id's
I have a problem, please help me..........
There is a table called delivery types in my database, and it contain delivery type and product id.
101 By Sea, By Air, By Currier
102 By Air, By Currier
102 By Air
103 Currier, By Air
I need to do a SQL quarry and take common delivery methods related to all products
How do I do this, is any body know how to quarry this?
Thanks and regards
December 11th, 2003, 11:39 AM
Your database design, in my opinion, is messed up.
This is a many-to-many relationship, and you should then have 3 tables instead of 1.
Then you should be able to query easier.
December 11th, 2003, 12:54 PM
I agree that this should have been broken out into another table... but since it isn't you could do the following:
SELECT ProductID FROM [Table]
WHERE DeliveryType LIKE '%AIR%'
This will return all productID where the word "AIR" appears anywhere in the deliveryType field.... But, again, this is much less efficient than if you had them in a separate table.
December 12th, 2003, 07:02 AM
thanks guys i got through the problem.