Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to use "Insert into" tables from QV. Does QV9 have this or is there any macros?
I want to insert 7 columns from my table in QV into the database.
I've tried to find in forum but no good luck.
No need to use the $(Include=e:\temp\insert_test.txt); syntax unless you really have a reason to.
You can simply write your SQL insert statements in the QV load script, along these lines:
ODBC CONNECT TO postgres_server1;
SQL INSERT INTO table1 VALUES ('2012-08-01', 'SE', 345, 0.345);
SQL INSERT INTO table1 VALUES ('2012-08-01', 'SE', 456, 0.456);
DISCONNECT;
The above has been verified to work with PostgreSQL, using their standard ODBC 64 bit Unicode driver.
Please note however that there is a readonly check box in the ODBC driver settings. Obviously, it should not be checked...
Seems there is a bug in the help file relating to this. In QV11 SR1 the help text for "SQL" states:
"Sending SQL statements which update the database will return an error, since QlikView per definition accesses all ODBC sources in read-only mode."
AFAICT that is simply not true, at least not when connecting to PostgreSQL databases.
/Göran