|
-----Original Message-----
From: orsburn@foxvalleytech.com <orsburn@foxvalleytech.com>
To: Midrange-L@midrange.com <Midrange-L@midrange.com>
Date: Thursday, March 29, 2001 5:28 PM
Subject: Looking for suggestions -- Interactive SQL - CAST
>I sent this to the RPG-L@midrange.com but is better for this group?? I
>just joined so I'm not sure what to expect.
> UPDATE Library1/BOOK2 SET BOOK_CODE1 = cast(book_code as char)
>
> Book_Code1 is char (I've changed the length on this)
> Book_Code is numeric (I've tried numeric, decimal) 4,0
Jeez, I just got done answering that one over there....
you are casting to char which IS (by default) one character....
use cast (field as char(4)) ... or maybe 5 for the sign ...
===========================================================
R. Bruce Hoffman, Jr.
-- IBM Certified Specialist - AS/400 Administrator
-- IBM Certified Specialist - RPG IV Developer
"America is the land that fought for freedom and then
began passing laws to get rid of it."
- Alfred E. Neuman
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.