Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating table

Status
Not open for further replies.

maarit

Programmer
Jun 20, 2001
1
FI
Hi,

I have three tables, customers, shops and customershops.
Table customer have rows name Id and customername.
Table shops have rows id and shopname,
table customershops have rows id, customerID (=same as table customer id) and shopid (=same as table shop id)

Now I want to update table customershops.
The user can select customername and shopname from the form.

But how can I update table customershop rows shopID and customerID.

Please help me.
 
I think you need not an update but an insert query:
insert into customershops
(
customerid,
shopid
)
values(select customerid from customer where customername='xxx'), values(select shopid from shops where shopname='yyy')
John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top