Forum Moderators: open

Message Too Old, No Replies

SQL - Copy one field to another

withen the same table

         

Night_Hawk

8:41 pm on Apr 20, 2003 (gmt 0)

10+ Year Member



I am trying to copy one field in a table to another field in the same table, any one can help with the SQL syntax?

the field is a string and the number or rows in the table about 7000 rows.

Thanks in advance.

txbakers

9:27 pm on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The basic syntax is "update TABLE set FIELD = newvalue WHERE something matches."

In your case, if there aren't any matches, you're in big trouble.

But you have to do it for each case in the database.

I have to do this as well sometimes and it's a nuisance for sure.

Night_Hawk

10:04 pm on Apr 20, 2003 (gmt 0)

10+ Year Member



Thanks txbakers for your help.