Home » SQL & PL/SQL » SQL & PL/SQL » Fill a field with an alpha plus the info from another field
Fill a field with an alpha plus the info from another field [message #381] Fri, 08 February 2002 09:58 Go to next message
CHRISTA S. WILLIAMS
Messages: 3
Registered: February 2002
Junior Member
In my table, CUST, I have a field zone_cd that is by and large a null value. I need it to have the letter Z and the contents of the field srt_cd. What I tried is this.Please correct me where I am making the mistake. Thank you.
---------------------------------------
update cust
set zone_cd = 'Z' + srt_cd
where srt_cd is not null
and zone_cd is null
Re: Fill a field with an alpha plus the info from another field [message #383 is a reply to message #381] Fri, 08 February 2002 10:09 Go to previous messageGo to next message
drewmoo
Messages: 6
Registered: February 2002
Junior Member
try this:

update cust
set zone_cd = ('Z' || srt_cd)
where srt_cd is not null
and zone_cd is null
Re: Fill a field with an alpha plus the info from another field [message #387 is a reply to message #381] Fri, 08 February 2002 11:51 Go to previous message
CHRISTA S. WILLIAMS
Messages: 3
Registered: February 2002
Junior Member
That was perfect. Thanks so much!
Previous Topic: line continuation character
Next Topic: Re: problem with procedure error
Goto Forum:
  


Current Time: Thu Apr 18 19:55:51 CDT 2024