|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
simple insert queryinsert into locationcatalog (cat_id, cat_id, cat_id, cat_id) values
(117, 118, 51, 45) where catalog.cat_id = 44 in (select locationcatalog.cat_id from catalog.cat_id inner join locationcatalog on catalog.cat_id = locationcatalog.cat_id) This is what I have. What I'm trying to do is insert the values 117, 118, 51, and 45 into the locationcatalog table adding new entries for customers who have cat_id 44. What should this look like? sintral wrote:
> insert into locationcatalog (cat_id, cat_id, cat_id, cat_id) values I don't understand your table structures, but you should do something> (117, 118, 51, 45) > where catalog.cat_id = 44 in (select locationcatalog.cat_id from > catalog.cat_id inner join locationcatalog > on catalog.cat_id = locationcatalog.cat_id) > > This is what I have. What I'm trying to do is insert the values 117, > 118, 51, and 45 into the locationcatalog table adding new entries for > customers who have cat_id 44. What should this look like? like this: insert into locationcatalog (cat_id, cat_id, cat_id, cat_id) select 117, 118, 51, 45 from CustomerCat where cat_id = 44 Chris |
|||||||||||||||||||||||