This is more of a technique question.
If you're inserting to SQL Server you would read records in RPG via ISAM or run an SQL.
Roll through the result set and generate INSERTS for SQL and call each insert me thinks.
If you're reading from SQL you would do the opposite
Run SQL Server Query or Sproc to query data.
Roll through the result set and insert into whatever table on the i via an ISAM table write or SQL INSERT.
Regards,
Richard Schoen
RJS Software Systems Inc.
Where Information Meets Innovation
Document Management, Workflow, Report Delivery, Forms and Business Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site:
http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT
------------------------------
message: 5
date: Thu, 21 Feb 2013 04:08:05 -0500
from: "Porterfield, Sean" <SPorterfield@xxxxxxxxxxxxxxxxxxxxxxx>
subject: RE: Microsoft Integration Services password
Stored procedure on the i? I'm having trouble envisioning the process. (Also have to figure out how a stored procedure fits into our change management...)
I can comprehend accessing a database, running a query, processing results. (Select * from branches; read result set; do something for each branch.)
What I'm trying to do is dump a table from one database to another. Maybe 300,000 records today; maybe a million next month.
Can I use a result set from a query against the i database as the source of an insert into MS SQL?
I browsed through Scott's
http://www.scottklement.com/presentations/External%20Databases%20from%20RPG.pdf document which was not confusing, and I do even see an example referencing localhost. I'm not sure if two different databases can be accessed at the same time, though it should be fairly easy to find out tomorrow after I get everything setup (assuming I can steal the time to do it.) If our system weren't down for backup, I'd do it now, since I can't sleep anyway. In the meantime, I'll read through the other docs on the site.
--
Sean Porterfield
As an Amazon Associate we earn from qualifying purchases.