MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

update a column of character type with Hexadecimal values

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Sat Jul 08, 2006 6:45 am    Post subject: update a column of character type with Hexadecimal values Reply with quote

Members,

I am trying to update a column which is POS CHAR(04) with a hexadecimal value 14250204 using query:
Code:

UPDATE TABLENAME SET POS = HEX(14250204) WHERE SEQNAME = 'ABCD'

I am getting the error
Code:

QUERY MESSAGES:                                 
The value beginning with "00D970DC" is too long.

If i would like to insert / update the POS value with Hexadecimal 14250204 what should be the syntax ? Can anybody help me out in this regard as my intention is to have some values ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12385
Topics: 75
Location: San Jose

PostPosted: Sat Jul 08, 2006 7:03 am    Post subject: Reply with quote

mfuser,

If you are trying to update the column with hex value then you don't use the HEX scalar function once again. Try this

Code:

UPDATE TABLENAME SET POS = X'14250204' WHERE SEQNAME = 'ABCD'


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group