|
Giri, Look at prepared statements. I think that will do what you want to do. Thanks, Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@hanoverwire.com http://www.hanoverwire.com 717.637.3795 Ext.3040 "Giri Gopal" <GiriGopal@bcginK To: <rpg400-l@midrange.com> .com> cc: Sent by: Subject: Using Embedded SQL rpg400-l-admin@mi drange.com 08/21/01 08:49 AM Please respond to rpg400-l Hello: I have a few questions using Embedded SQL in RPG ILE scenario. Say for example: I have 2 files. File A is a control file and File B is a transaction data file. File B has 5 fields: BFIELD1 char 10 BFIELD2 char 10 BFIELD3 char 10 BFIELD4 char 10 BFIELD5 char 10 File A has 1 Field : AField Char 10 Now the data in File A is: Record 1: BFIELD1 2: BFIELD2 3: BFIELD5 The data above in File A are the field names I want to select from File B. ProgramX should read File A and build an dynamic SQL statement using the data from File A. and then the execution of the SQL should result the data from File B. Can this be done using EMBEDDED SQL? If yes does any one have a sample code. Thanks for your help in advance. GG _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@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.