1752761 Members
5341 Online
108789 Solutions
New Discussion юеВ

update table

 
SOLVED
Go to solution
Ratzie
Super Advisor

update table

I can not seem to get this to work.
update table1
set table1.cola ='PEPSI'
where table2.feature = 'PEPSI TYPE'
and table1.master_key = table2.master_key

So I am updating the main table if the second table contains the right data.
16 REPLIES 16
Aussan
Respected Contributor

Re: update table

Try " instead of '

example "PEPSI"
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor

Re: update table

here is the example

UPDATE table1
SET table1.cola="PEPSI"
WHERE tabel2.feature = "PEPSI TYPE" AND table1.master_key=table1.master_key
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor

Re: update table

here is the example

UPDATE table1
SET table1.cola="PEPSI"
WHERE tabel2.feature="PEPSI TYPE" AND table1.master_key=table1.master_key
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor

Re: update table

what happend?
The tongue weighs practically nothing, but so few people can hold it
TwoProc
Honored Contributor

Re: update table

What error do you get?

We are the people our parents warned us about --Jimmy Buffett
Ratzie
Super Advisor

Re: update table

same error
I have never used double quotes around values
Ratzie
Super Advisor

Re: update table

invalid sql statement
Aussan
Respected Contributor

Re: update table

what's the error??
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor

Re: update table

could you cut and past the exact syntax you are using, and also the error does it point at the exact line the error is or no
The tongue weighs practically nothing, but so few people can hold it