IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem with substring


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Thu May 21, 2009 4:16 pm
Reply with quote

Hi

I need to update one field in table but its giving error in syntax.
here is my code

update d9331cos.parcalc
set substr(homeid,4,4) = 'CO{{'
where hmo_id = '1223344'

Its giving error before ( in line 2

regards,
rupesh gupta
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6965
Location: porcelain throne

PostPosted: Thu May 21, 2009 4:51 pm
Reply with quote

you can't SET substr(column)

you have to SET column = substr(...) concatenate substr(....)

RTFM
Back to top
View user's profile Send private message
rupesh gullu

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Thu May 21, 2009 6:31 pm
Reply with quote

Hi Dick,

Thanks it worked fine

regards,
rupesh gupta
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6965
Location: porcelain throne

PostPosted: Thu May 21, 2009 6:38 pm
Reply with quote

rupesh gupta,

glad you were able to solve your problem.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Problem moving a cobol program into E... COBOL Programming 3
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
Search our Forums:


Back to Top