Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

Script result nothing

Hello Guys,

I really didn't get why my script doesn't work.

here is he script :

ODBC CONNECT32 TO vv_vv;

NoConcatenate

F_temp:

select

Tel,

p.off as "offer"

from p_edw.sub_off o

left join p_edw.subs s on o.subs_id =s.subs_id

left join p_edw.offp on p.off_id = o.off_id

where (current_date -1 between valid_from and valid_to );

exit script;

the result is nothing :

Capture.PNG

any help please

Thanks

12 Replies
sunny_talwar

May be check after adding SQL before SELECT

NoConcatenate

F_temp:

SQL select

SUBSTR(s.telephone_number, 4, 😎 as "Concern. MSISDN",

p.offer_name as "offer"

from p_edw.subcriber_offer o

left join p_edw.subs s on o.subs_id =s.subs_id

left join p_edw.offp on p.off_id = o.off_id

where (current_date -1 between valid_from and valid_to );

master_student
Creator III
Creator III
Author

I added , SQL before my query but didn't get nothing

vishsaggi
Champion III
Champion III

May be here? there is no space for the table alias for p_edw.offp change it to p_edw.off p

NoConcatenate

F_temp:

SQL select

SUBSTR(s.telephone_number, 4, 😎 as "Concern. MSISDN",

p.offer_name as "offer"

from p_edw.subcriber_offer o

left join p_edw.subs s on o.subs_id =s.subs_id

left join p_edw.off p on p.off_id = o.off_id

where (current_date -1 between valid_from and valid_to );

sunny_talwar

Does this run outside QlikView?

select

SUBSTR(s.telephone_number, 4, 😎 as "Concern. MSISDN",

p.offer_name as "offer"

from p_edw.subcriber_offer o

left join p_edw.subs s on o.subs_id =s.subs_id

left join p_edw.offp on p.off_id = o.off_id

where (current_date -1 between valid_from and valid_to );

master_student
Creator III
Creator III
Author

yes, it runs on geen plume

Not applicable

try this way,

no need  'as'  in query.

And also check the  date format in where  condition.

select

SUBSTR(s.telephone_number, 4, 😎   "Concern. MSISDN",

p.offer_name  "offer"

from p_edw.subcriber_offer o

left join p_edw.subs s on o.subs_id =s.subs_id

left join p_edw.offp on p.off_id = o.off_id

where (To_Char(current_date,'MM/DD/YYY') -1 between To_Char(valid_from,'MM/DD/YYYY') and To_char(valid_to,'MM/DD/YYYY' );

antoniotiman
Master III
Master III

May be

F_Temp:

NoConcatenate

......

Peter_Cammaert
Partner - Champion III
Partner - Champion III

"geen plume"? What Sunny means is does it run in the SQL query tool for your DBMS? First check overthere if your query is correct and returns any rows.

BTW Vishwarath has a good point - your SQL statement refers to a table alias p, but p is defined nowhere. Probably due to a missing space in

left join p_edw.offp on p.off_id = o.off_id

master_student
Creator III
Creator III
Author

nop