|
----- Original Message ----- From: "Whiteman, Greg" <Greg.Whiteman@transamerica.com> To: <rpg400-l@midrange.com> Sent: Tuesday, December 18, 2001 8:17 AM Subject: RE: Embedded SQL - Insert > Just use harcoded space literals in your insert statement. Assuming your > filler fields are after the fields CHKDAT, CHKNUM, VENDOR, your insert sql > would look like: > > c/exec sql > c+ insert into mhtrsvp > c+ select clabrn,cladat,claseq, > c+ clanum,clalin,compno, > c+ chkdat,' ', chknum,' ', vendor,' ' > c+ from mheopfp where subsys = 'CP' > c/end-exec as additional information, this is retro-active programming. What should really be done is the file should be declared (originally) as null capable or with default. this would allow you to skip unnecessary fields on an insert. also note that the default value in DDS is NOT the same as with default in SQL DDL and that the with default clause is only available in SQL. =========================================================== R. Bruce Hoffman, Jr. -- IBM Certified Specialist - iSeries Administrator -- IBM Certified Specialist - RPG IV Developer "I want to be different, just like everybody else!" - Ceili Rain
As an Amazon Associate we earn from qualifying purchases.
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.