Question

  Asked: Mar 11 2008   3:45 AM GMT
  Asked by: Vsevilod


converting character to numeric in query/400


AS/400 Query

Hello, Is there a way of converting character to numeric data in WRKQRY? I've read Query/400 manuals and found no simple way of data conversion. Thanks in advance!

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0




Hi,

I don't believe there is a simple way to do this in WRKQRY. You might have more success with Query Manager (command STRQM) or SQL (command STRSQL).

If you really need to convert character to numeric for WRKQRY, what you could do is create an identical DDS described file with a numeric field in the place of your character field (with the same lengths) and use CPYF with FMTOPT(*NOCHK). But I'm sure there are better solutions than this.

Regards,

Martin Gilbert.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register