Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Rakan
Contributor
Contributor

QVD Generation in Qliksense

Hello everyone,

 

I am trying to get a qvd generation app from qlikview to qliksense however when I paste the script some parts of it show as green.

Rakan_0-1701692126314.png

Rakan_1-1701692162558.png

can you please help me with this

 

Thank you.

 

Labels (1)
2 Replies
Rakan
Contributor
Contributor
Author

Here is the code in text:


Visit:
Load *;
SELECT
LTRIM( RTRIM(LOCATIONS.LOCATION_CODE))||'-'||LTRIM( RTRIM( ROUTES.ROUTE_CODE)) as Location_Route_Code,
BO_CALL_PLAN.Route_Key,
--LTRIM( RTRIM(LOCATIONS.LOCATION_CODE))||' '||LOCATIONS.LOCATION_NAME,
--LTRIM( RTRIM( AREA.AREA_CODE))||' '||AREA.AREA_NAME,
--LTRIM( RTRIM( ROUTES.ROUTE_CODE))||' '||ROUTES.ROUTE_DESC,
VISITED,
CALL_PLAN,
--'W '||LTRIM(TO_CHAR(CUSTOMER_CALENDAR.ALMARAI_YEAR, '9999'))||'/'||LTRIM(TO_CHAR(CUSTOMER_CALENDAR.ALMARAI_WEEK, '09')),
to_char(CUSTOMER_CALENDAR.END_DATE,'DD/MM/YYYY') as TransactionDate
FROM
LOCATIONS,
AREA,
ROUTES,
BO_CALL_PLAN,
CUSTOMER_CALENDAR
WHERE
( ROUTES.AREA_CODE=AREA.AREA_CODE and ROUTES.LOCATION_KEY=AREA.LOCATION_KEY )
AND ( LOCATIONS.LOCATION_KEY=AREA.LOCATION_KEY )
AND ( CUSTOMER_CALENDAR.TIME_KEY=BO_CALL_PLAN.TIME_KEY )
AND ( ROUTES.ROUTE_KEY=BO_CALL_PLAN.ROUTE_KEY )
AND
CUSTOMER_CALENDAR.ALMARAI_YEAR IN ( $(vCYear), $(vLYear));

 

CustCount:
Load *;
select distinct count(customer_key) as customer_count,
location_code, to_char(current_date,'DD/MM/YYYY') as TransactionDate,
LTRIM( RTRIM(L.LOCATION_CODE))||'-'||LTRIM( RTRIM(R.ROUTE_CODE)) as Location_Route_Code,
c.Route_Key
from locations l, customers c , routes r, area a
where l.location_key = c.location_key
and R.AREA_CODE = a.area_code
and l.location_key = r.location_key
and r.location_key = a.location_key
and c.route_key = r.route_key
and c.active='Y'
group by location_code, to_char(current_date,'DD/MM/YYYY'),
LTRIM( RTRIM(L.LOCATION_CODE))||'-'||LTRIM( RTRIM(R.ROUTE_CODE)), c.Route_Key;

Or
MVP
MVP

If it still runs, you can ignore the syntax highlighting. That said, I think the issue is the need for a space between the double pipes and whatever is next to them, e.g.

LTRIM( RTRIM(LOCATIONS.LOCATION_CODE)) || '-' || LTRIM( RTRIM( ROUTES.ROUTE_CODE)) as Location_Route_Code,

Or_0-1701692668286.png