Welcome to WebmasterWorld Guest from 23.20.8.182

Forum Moderators: open

Message Too Old, No Replies

SQL staement to change field

want to update field from a to b

     
5:28 pm on Feb 23, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 9, 2006
posts:177
votes: 0


I want to have an sql statement to UPDATE tablexyz.

Basically:

Select * FROM tablexyz and update field b from the value in field a and override what already exists in field b.

Thanks,
Matt
6:03 pm on Feb 23, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:June 3, 2004
posts:193
votes: 0


This really belongs in the Database forum.. but ya, are you trying to copy the value in field a to field b? if so you can just simply run a update query like,

UPDATE tablexyz SET field_b = field_a WHERE <any conditions you want matched>
6:24 pm on Feb 23, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 9, 2006
posts:177
votes: 0


awesome, thanks!