we are trying to figure out how to do multiple SQL-statements (MySQL). The DB is set on "allow multiple statements", so the problem obviously lies in our lack of programming ability:
GET DATA /TYPE=ODBC /CONNECT='DSN=Stephanies Datenbank;' /SQL=' CREATE TABLE T2 AS SELECT * FROM ebet.program_Event limit 0, 100;' /SQL='SELECT * FROM T2;' /ASSUMEDSTRWIDTH=255. CACHE. EXECUTE. The error message: >Error. Command name: GET DATA >Unrecognized keyword is found : "SQL". >Execution of this command stops. >Error # 105. Command name: EXECUTE >This command is not valid before a working file has been defined. >Execution of this command stops. each statement itself works: GET DATA /TYPE=ODBC /CONNECT='DSN=Stephanies Datenbank;' /SQL=' CREATE TABLE T4 AS SELECT * FROM ebet.program_Event limit 0, 199' /ASSUMEDSTRWIDTH=255. CACHE. EXECUTE. GET DATA /TYPE=ODBC /CONNECT='DSN=Stephanies Datenbank;' /SQL=' SELECT * FROM T4;' /ASSUMEDSTRWIDTH=255. CACHE. EXECUTE. DATASET NAME DataSet1 WINDOW=FRONT. need some help, thanks
Dr. Frank Gaeth
|
I think the second sql statement needs to start with a space, as the two queries are merged together.
Cheers!!
Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
we tried to find out, what you mean by space.
Dr. Frank Gaeth
|
I meant instead of: /SQL='SELECT * FROM T2;' You let the statement precede with one space: /SQL=' SELECT * FROM T2;' I used multiple SQL statements in GET DATA the other day. It should work. Cheers!! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Free forum by Nabble | Edit this page |