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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

sql error in qlik

Hello

I didn't understand why i get this error : syntaxe error at or near select

here is the script :

The query runs on green plume and the connexion to the database works on qlikview

//connexion

SELECT "Concern. MDN", "offer"

FROM   (SELECT SUBSTR(s.tt, 4, 😎  AS "Concern. MDN",

               p.offer_name                    AS "offer",

               Rank() over ( PARTITION BY s.tt ORDER BY o.valid_from DESC) AS last_offer

        FROM   p_edw.subber s

               left join p_edw.subber_offer o ON o.subber_id = s.subber_id

                         AND To_char(o.valid_to, 'yyyy-mm-dd' :: text) = '9999-12-31' :: text

               left join p_edffer p ON p.off_id = o.off_id) m

WHERE  last_off = 1

exit script ;

2 Replies
PrashantSangle

What kind of error you are getting???

Please post your error msg??

try

SQL SELECT your query.

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

Hi,

In your from clause comment :: text and try/

FROM   p_edw.subber s

               left join p_edw.subber_offer o ON o.subber_id = s.subber_id

                         AND To_char(o.valid_to, 'yyyy-mm-dd' :: text) = '9999-12-31' :: text

               left join p_edffer p ON p.off_id = o.off_id) m

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂