Forum Moderators: coopster

Message Too Old, No Replies

Mass Replacing of text from 1 field to another

         

weeevil

9:37 am on May 17, 2007 (gmt 0)

10+ Year Member



Hi all,

I have an SQL database, and i am trying to make a statement that checks if a field is not empty, and if it is empty, it puts in what is in another field.

They are both text fields, i've been scouring the net for if then statements, but im sure it's something more than a simple if then statement.

Thanks!

joelgreen

10:04 am on May 17, 2007 (gmt 0)

10+ Year Member



update tablename set city1 = city2 where city1 = ''

weeevil

11:02 am on May 17, 2007 (gmt 0)

10+ Year Member



thanks a lot, worked a treat