Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Hajar1
Contributor
Contributor

Error in the execution of a query

Hi,

I want to execute a job in which there is the following query:

"SELECT "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.seq_day_tmp,"
"coalesce("+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.seq_request_tmp,(SELECT "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".dim_request_scd.seq_request_scd FROM "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".dim_request_scd"
"WHERE "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request_scd.seq_request=(select "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request.seq_request from "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request"
"WHERE "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request.cod_request='Non Renseigné'))) AS seq_request_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.seq_request_scd_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.seq_application_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.deadlines_taking_charges_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.deadlines_solving_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.deadlines_delivery_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.nb_resquest_tmp,"
""+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.flag_successeful_delivery_tmp,"
"FROM "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request"
"left outer join "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request_scd"
"on "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_request.seq_request_tmp="+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request_scd.seq_request"
"and ("+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+\".\"+tmp_dim_request_scd.dat_begin = null or (select CURRENT_DATE) >= "+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+".tmp_dim_request_scd.dat_begin)"
"and ("+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+\".\"+tmp_dim_request_scd.dat_end = null or (select CURRENT_DATE)<"+context.DW_ES_TMP_Database+\".\"+context.DW_ES_TMP_Schema+\".\"+tmp_dim_request_scd.dat_end);"

 

But the execution I got the following error:

 

0683p000009M6V0.png

Labels (2)
1 Solution

Accepted Solutions
ThWabi
Creator II
Creator II

Hi ra_2019,

 

is there a + plus sign missing before "WHERE " (in lines 5 and 8)?

 

Best regards,

 

Thomas

 

View solution in original post

2 Replies
ThWabi
Creator II
Creator II

Hi ra_2019,

 

is there a + plus sign missing before "WHERE " (in lines 5 and 8)?

 

Best regards,

 

Thomas

 

Hajar1
Contributor
Contributor
Author

Thanks Thomas, it works now. But I got another error 0683p000009MPcz.png

 

0683p000009M6V5.png