× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In the newsgroup it.comp.os400 there were once a post on READING packed data with SQL HEX function.
I _think_ you could do the same for inserting.


Sono campi packed? Con la funzione HEX.
Supponiamo che il campo aliquota IVA sia P 5,2 e che occupi 3 byte alla
posizione 89, l' istruzione sarà:

SELECT SUBSTR(ATBUNI, 1, 44) AS DESCRIZIONE, DEC(
DEC(SUBSTR(HEX(SUBSTR(ATBUNI, 89, 3)), 1, 5), 5, 0) / 100, 5, 2) AS
ALIQUOTA_IVA FROM ANTAB00F WHERE ATBCOD = 'Y4N'

The example is for field ALIQUOTA_IVA, decimal 5,2, 3 bytes at position 89 of filed ATBUNI.


Sorry for not being more helpful, but every time that I read this example I get an headache ...

Best regards,

    Davide Grandi
--
Ing. Davide Grandi
davide.grandi@xxxxxxxxx

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.