Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView data into SQL

Hi QV Community,

I am trying to load QV data into SQL as a test without using VB and dont seem to have any luck. I am using the below script, and it is erroring out, can someone help?

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Clinicom_Temp;Data Source=LPTLoad01;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=QVLPT01;Use Encryption for Data=False;Tag with column collation when possible=False];

T1:
LOAD * INLINE [
F1, F2
F, 6
G, 7
H, 8
I, 9
J, 10
]
;

For i= 0 to NoOfRows('QVtoSQL') -1
LET V_F1 = peek('F1',$(i),' QVtoSQL ');
LET V_F2 = peek('F2',$(i),' QVtoSQL ');      
SQL INSERT INTO QVtoSQL (F1,F2) VALUES('$(V_F1)','$(V_F2)');
NEXT

6 Replies
Gysbert_Wassenaar

Make sure to enable the option Open Database in Read and Write Mode on the Settings tab of the script editor. Otherwise the connection will be read-only. And of course the user you connect as needs insert priviliges in the target database.


talk is cheap, supply exceeds demand
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Its not possible to directly push the data from QlikView to Database.

     Have a look at the link for the way to do this.

     http://community.qlik.com/docs/DOC-3054

     http://community.qlik.com/docs/DOC-2784

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

where do i find this? sorry i am a novice

Not applicable
Author

interesing, a lot of macros can cater for this though

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     It depends on which way is convenient for your scenario.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

i just wanted to try a test as above and build on it...