Page 1 of 1

Update one table to another

Posted: Sun Dec 18, 2011 2:01 pm
by s1a9r8a0
Dear All,

I need to update the data's from one table(my_channels) to another table(all_package).

I i used the following code. UPDATE all_packages SET channels = 'my_channels.ch_name' WHERE channels != 'my_channels.ch_name'

0 row(s) affected. ( Query took 0.0004 sec )

Please help....

Re: Update one table to another

Posted: Sun Dec 18, 2011 5:50 pm
by mikosiko

Code: Select all

UPDATE all_packages SET channels = 'my_channels.ch_name' WHERE channels != 'my_channels.ch_name'
take the single quotes out of there...

Code: Select all

UPDATE all_packages SET channels = my_channels.ch_name WHERE channels != my_channels.ch_name

Re: Update one table to another

Posted: Sun Dec 18, 2011 8:55 pm
by califdon
What is it that you are trying to do? That SQL looks to me like it would never work, even after correcting for the quotes. Please explain what you are trying to achieve.