Quote
Write an UDPDATE statement that modifies the Invoices table. Change the terms_id to 2 for each invoice that's for a vendor with a default_terms_id of 2
The default_terms_id is a column in another table called Vendors.
My second attempt at this is:
update invoices set terms_id = 2 where vendor_id = (select vendor_id from vendors where default_terms_id = 2)
However I get get errors saying the subquery needs to only return a single value, but this is the only solution to something he posted. Do i need a join of some kind?

New Topic/Question
Reply




MultiQuote




|