On Tue, Aug 30, 2016 at 1:40 PM, Duane Scott <dscott@xxxxxxxxxxx> wrote:
John, you caught me. I'm often way too wordy, at least that's what I'm told by everybody else.
I actually didn't think you were too wordy. If anything, you weren't
wordy enough, because I kept not finding the words I was looking for.
;) But I think the problem was mostly gaps in my own understanding.
Buck filled in one of them, which is: Can RDi be used as an SQL script
interpreter? The answer is "yes", which makes sense to me. (I am not
an RDi user, if you couldn't tell.)
One of the remaining holes is: How do you use SQL to "work with text files"?
Now, my SQL is pretty rudimentary, so I am very open to the
possibility that there are SQL facilities that I am not aware of.
Right now, I don't know how SQL opens or reads text files. As far as I
know, SQL only works in the context of data that's already in a
database.
Is this your question too? Are you saying that you already know how to
(1) import text data into a database, and then (2) from there, use SQL
to work with it; and now you are trying to combine those two steps
somehow?
If so, then unless someone swoops in with the magic (and probably kind
of new) SQL feature I'm not aware of, then yeah, that bubble is burst.
But...
I've been using SQL for a number of years, mostly interactively on the IBM i and in the last few years within RPG as embedded SQL. I am a big fan. I am also a big fan of doing things simply, meaning the less steps the better.
RPG with embedded SQL is a great tool. You can get the same kind of
thing and more with Python (or a number of other languages, but Python
is the one I know best, and the one I believe most people would find
easiest to learn). The same Python program can read text files
directly and easily from your PC and issue SQL commands to be executed
on the i. I do it all the time. (It can also read Excel files
directly, and that would actually be even simpler.)
Python is a powerful one-stop shop. And you might be able to use it
from RDi, I'm not completely sure. Buck may be able to comment on
that.
John Y.
As an Amazon Associate we earn from qualifying purchases.