| || |
How to use: \"ddt_update_from_db\" function. ODBC query (.qry)
User (firstname.lastname@example.org) posted:
Howdy all: Could somebody provide a feedback on this. I'm trying to
use "ddt_update_from_db" function to get data from a database and put
in a table. Now, the second parameter of this should be "Either an
*.sql file containing an ODBC query or a *.djs file containing a
conversion defined by Data Junction ".
My question is this. How I create such *.sql file or *.djs?
I tryed, but I get no records from the database. I'll insert the
code so you can have a better understanding of what I'm trying to do.
table = "front_end.xls";
DSN="DSN=TOCUSSYS;"; # Our Database
connection_string =DSN & SRVR & UID & PWD;
# Connect to database
rc = db_connect("query1",connection_string);
if (rc == E_CONNECTION_FAILED)
not connect to database schema");
# Set up SQL statement
SQL_statement = "SELECT CLSTR_NBR FROM CHN_SPEC_T";
# Now execute SQL statement
rc = ddt_update_from_db(table, SQL_statement, count);
Thanks a lot,