|
Sorry Tommy it will work. The value of the SQLString that I provided would be. 'Select * from file where number = 2' not 'Select * from file where number = ' 2'' Because if you look over it again you'll see that I did NOT concatenate an ( ' ). The %EditC was only used to concat the number to the string. Try our New Country Benedicts -- Breakfast with a Bob Evans twist! rpg400-l-bounces@xxxxxxxxxxxx wrote on 08/14/2006 10:28:12 AM:
That won't work...%EDITC converts the number to a character. Any numeric field MUST use a numeric value any attempt to add the numeric to the string will cause SQL precompile to fail since '000002' is not the same as 2. Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael_Schutte@xxxxxxxxxxxx Sent: Monday, August 14, 2006 9:25 AM To: RPG programming on the AS400 / iSeries Subject: Re: SQLRPGLE %EditC should work... maybe you're just not using it right, make sure it's outside of the string. SQLString = 'Select * from file where number = ' + %EditC(hostnumber:'Z'); Then for executing it, please look into the SQL reference manual using the PREPARE statement. The manual can be found on the IBM website. Thanks. Try our New Country Benedicts -- Breakfast with a Bob Evans twist!
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.