Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
any help please
Thanks
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 );
I added , SQL before my query but didn't get nothing
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 );
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 );
yes, it runs on geen plume
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' );
May be
F_Temp:
NoConcatenate
......
"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
nop