Sure thing - just use the standard syntax for a hexadecimal literal - X'some-hex-value'

In your case, just remove HE and both parentheses.

HTH
Vern

On 4/10/2018 12:31 PM, Buzz Fenner wrote:
I've tried googling around for a solution and have not found anything straightforward (or any solution for that matter) so I thought I'd try here as a last resort (before I'm forced to write a program).

I have a table column defined as CHAR(42) which, in an RPG program data structure, is redefined as an 14 element array with the individual elements defined as PACKED(5,0).

If you did this:

SELECT HEX(field)
FROM mytable
WHERE condition

it would look something like this:

00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F

were all the elements = 0.

I'd like to be able to do something like this (I know the syntax is wrong, but maybe you get the idea):

UPDATE mytable
SET field = HEX('12345F12345F12345F12345F12345F12345F12345F12345F12345F12345F12345F12345F12345F12345F')
WHERE condition

Is this even possible?

--
Buzz Fenner, Analyst/Systems Administrator
+1 (870) 930.3374 bfenner@xxxxxxxxxxxxxxxx<mailto:bfenner@xxxxxxxxxxxxxxxx>

City Water and Light of Jonesboro
Office: +1 (870) 935.5581 / Fax: +1 (870) 930.3301
Physical: 400 East Monroe Ave., Jonesboro, AR 72401
Mailing: PO Box 1289, Jonesboro, AR 72403-1289

This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. City Water and Light of Jonesboro is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.



________________________________

This electronic mail transmission may contain confidential or privileged information. If you believe that you have received this message in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.