Something is wrong with the zoned value. O is not valid symbol for
negative. Should be a D.

On Mon, Aug 10, 2015 at 11:53 AM, <rob@xxxxxxxxx> wrote:

At 7.2 I can do this:
values int(zoned(-1))

And I can do:
CREATE TABLE QTEMP.TEMP (
MYZONED NUMERIC (5 , 2) NOT NULL WITH DEFAULT)

INSERT INTO QTEMP.TEMP (MYZONED) VALUES(-1) WITH NC

INSERT INTO QTEMP.TEMP (MYZONED) VALUES(-1.2) WITH NC

SELECT INT(MYZONED) FROM QTEMP.TEMP


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Alan Shore <ashore@xxxxxxxx>
To: "midrange-l@xxxxxxxxxxxx" <midrange-l@xxxxxxxxxxxx>
Date: 08/10/2015 02:21 PM
Subject: convert zoned to integer within SQL
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Hi everyone
Before I forget - we are on V5r4
Has anyone been able to convert a zoned field to integer within SQL
I know about and have used the api QXXZTOI, but I was hoping someone had
accomplished this in SQL
As always - all responses gratefully accepted

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2019 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].