Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Question about direct query

Hi,

I am trying to use direct select in Qlikview Personal Edition 12.1

I have this query in scripts editor and it works fine:

ODBC CONNECT32 TO [odbc_consumo;DBQ=C:\.........\ficheros\modelo_estrella.mdb];

SQL SELECT cod_cliente,cod_periodo,cod_segmento,cod_tarifa,cod_terminal,hc_consumo

FROM hc_consumo;

Now I am trying to use in direct mode:

ODBC CONNECT32 TO [odbc_consumo;DBQ=C:\.........\ficheros\modelo_estrella.mdb];

DIRECT SELECT cod_cliente,cod_periodo,cod_segmento,cod_tarifa,cod_terminal,hc_consumo

FROM hc_consumo;

But it doesn' work.....teh error is

"No Direct statement

DIRECT SELECT cod_cliente,cod_periodo,cod_segmento,cod_tarifa,cod_terminal,hc_consumo

FROM hc_consumo"

Can anybody help me?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

It could be the time the query is cached, using the variable DirectCacheSeconds, by default set to one hour.

I can say it works because I have several applications reading from HANA that we only reload once every day to refresh the master data, but the fact data remains (no new columns). HANA is updated more often and the charts display the right values (i.e.: same as in HANA).

View solution in original post

13 Replies
Miguel_Angel_Baeyens

The DIRECT statement is to be used with the QUERY syntax instead of SQL SELECT. See here for more information:

QlikView Direct Discovery FAQ 11.2 SR7.pdf

Direct Discovery Technical Addendum_11.2_SR11_and_Sense.pdf

Direct Discovery ‒ QlikView

Direct Query ‒ QlikView

Anonymous
Not applicable
Author

Thanks Miguel Angel,

One question:

When I work in direct query mode, is there anyway to regresh a graph when database data has changed.

Something similar to 'refresh' to see the new data in the graph

Thanks!!

Miguel_Angel_Baeyens

Short answer is you don't need to reload, in general.

Longer answer is that since the values of the dimensions in the query are stored into the in-memory data model, and every time you click on the chart the SQL query is executed, as long as the dimensional values and fields in the chart remain the same, then there is no need to reload. QlikView will not know whether the data in the underlying database has changed, it sends the SQL query, and take the resulting values.

Anonymous
Not applicable
Author

Hi Miguel Angel,

In my project , I don't see any refreh. I change the data o in Oracle database (commit changes(

and make a selection y mu qlik doc, but it remains the old values.

This is mu code:

ODBC CONNECT TO [odbc_oracle;DBQ=XE] (XUserId is cbdRGCdKfKQKEJdJcH, XPassword is cKSNOCdKSBMCTbAO);

Direct Query

Dimension COD_CLIENTE,COD_PERIODO,COD_TARIFA 

Measure HC_CONSUMO

from DW_AERO.HC_CONSUMO;

Miguel_Angel_Baeyens

If there are new values in COD_CLIENTE, COD_PERIODO or COD_TARIFA then it will not refresh, because those values MUST be in-memory, and therefore you need to reload the whole application.

If there are new values only in HC_CONSUMO, it should work.

Anonymous
Not applicable
Author

I am only changing hc_consumo, I am updating and existing row in database and I only change

hc_consumo.

If I close and open the doc the the value refresh, but when I make selection it dosen't...

Do I have to change something in the chart?, do it depend on the odbc conector?

Thanks

Miguel_Angel_Baeyens

I'd have to see the application and the connection to the database. Did you read through the documentation to see if any variable could help you in refreshing this data?

Anonymous
Not applicable
Author

I can't share the doc because I am working with Personal Edition

Miguel_Angel_Baeyens

It could be the time the query is cached, using the variable DirectCacheSeconds, by default set to one hour.

I can say it works because I have several applications reading from HANA that we only reload once every day to refresh the master data, but the fact data remains (no new columns). HANA is updated more often and the charts display the right values (i.e.: same as in HANA).