Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Could anyone help me here in solving the problem where I wish to keep 2 separate tables based on status however qlik appends the data in one single table which is not recommended by my process. Here is the queries being used in Data Load manager -
LIB CONNECT TO 'IMDD_PROD_64 (internal_rgoyal)';
OHS_ENTERED_ORDERS:
SQL
SELECT * FROM SERVORDPROPROD1..T_OPS_OHS_DATA
WHERE UPPER(D_STATUS) = 'ENTERED'
AND D_MONTHX >= (select add_months(to_date((extract (year from current_date)) || '0101','YYYYMMDD'),-12));
And then
LIB CONNECT TO 'IMDD_PROD_64 (internal_rgoyal)';
OHS_COMPLETED_ORDERS:
SQL
SELECT * FROM SERVORDPROPROD1..T_OPS_OHS_DATA
WHERE UPPER(D_STATUS) = 'COMPLETED'
--AND UPPER(D_ORDER_ORIGIN) = 'CUSTOMER'
AND D_MONTHX >= (select add_months(to_date((extract (year from current_date)) || '0101','YYYYMMDD'),-12));
I am somehow aware about the noconcatenation clause however I am not sure how can it be used.
thanks for the help!!
You are posting in a forum called "New To QlikView". However, it seems to me that you are using Qlik Sense. To get quicker and more to the point responses, please consider moving your question to a Qlik Sense forum.
Just follow the steps outlined here: QlikCommunity Tip: How to move your discussion thread
Hello Rahul.
If you don´t want to concatenate tables, you can use NoConcatenate
LIB CONNECT TO 'IMDD_PROD_64 (internal_rgoyal)';
OHS_ENTERED_ORDERS:
Load
*
;
SQL
SELECT * FROM SERVORDPROPROD1..T_OPS_OHS_DATA
WHERE UPPER(D_STATUS) = 'ENTERED'
AND D_MONTHX >= (select add_months(to_date((extract (year from current_date)) || '0101','YYYYMMDD'),-12));
OHS_COMPLETED_ORDERS:
NoConcatenate
Load
*
;
SQL
SELECT * FROM SERVORDPROPROD1..T_OPS_OHS_DATA
WHERE UPPER(D_STATUS) = 'COMPLETED'
--AND UPPER(D_ORDER_ORIGIN) = 'CUSTOMER'
AND D_MONTHX >= (select add_months(to_date((extract (year from current_date)) || '0101','YYYYMMDD'),-12));
I would prefer to generate a fact table with a Origin field
LIB CONNECT TO 'IMDD_PROD_64 (internal_rgoyal)';
OHS_ORDERS:
LOAD
*
,'Entered' as Origin
SQL
SELECT * FROM SERVORDPROPROD1..T_OPS_OHS_DATA
WHERE UPPER(D_STATUS) = 'ENTERED'
AND D_MONTHX >= (select add_months(to_date((extract (year from current_date)) || '0101','YYYYMMDD'),-12));Concatenate( OHS_ORDERS)
LOAD
*
,'Customer' as Origin
;
SQL
SELECT * FROM SERVORDPROPROD1..T_OPS_OHS_DATA
WHERE UPPER(D_STATUS) = 'COMPLETED'
--AND UPPER(D_ORDER_ORIGIN) = 'CUSTOMER'
AND D_MONTHX >= (select add_months(to_date((extract (year from current_date)) || '0101','YYYYMMDD'),-12));
With this option, you have only one table, avoiding synthetic keys and you can get any value (with Set Analysis, por example)
Thanks for the response.
However could we save the output in 2 different tables if possible for specific reasons - there are few fields which are there however calculated only for Completed orders.
Of course you can have 2 output tables, using NoConcatenate.
Maybe this post can help you to understand it better