Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Partner
Partner

STORE results in an oracle db

Hi to all.

i need your help for build a query to store results in an Oracle DB.

The steps i would like to implements with macro are:

1) DB connection to Oracle

2) store in Oracle the value of the Object called 'Result' (site on a dashboard).

The connection works. I need some help for the second step.

With SetAnalysis I build a straight table called  'RESULT'. So i have to connect on Oracle,

bring the SheetObject (RESULT) and build an insert.

sub test

               dim sConn, oConn

               Set oConn = CreateObject("ADODB.Connection")

        oConn.Open "Driver={Microsoft ODBC for Oracle};" & _

                  " Server=SNAME;uid=user;pwd=pass;"

        ???  What is the correct syntax for:

        set obj = ActivateDocument.getObject('RESULT')

        for ...

               sSQLStr = "INSERT INTO DHZ7DA1000.TMP_CLI(CONSUMER_ID, EDV_CODE)

                                 VALUES (obj.getvalue(1), obj.getvalue(2))"

        oConn.Execute sSQLStr

               oConn.Close

               Set oConn = Nothing

end sub

Thanks to all...