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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
csairam367
Contributor
Contributor

to add a field to existing table

could you implement in qlikview through this query

SELECT COUNT(*)

              INTO V_PROVISIONING_CNT

              FROM VSNL_INT_POS_STATUS_UPDATES VI

             WHERE VI.ATTRIBUTE2 = P_SERVICE_ID

               AND VI.OBJECT_ID = V_OPPORTUNITY_ID

               AND VI.STAGE_NAME = 'COLLSHF';

         

            IF V_PROVISIONING_CNT <> 0 THEN

              V_ORDER_STATUS := 'Provisioned';

            ELSE

              V_ORDER_STATUS := 'Under Provisioning';

            END IF;

          END IF;

        EXCEPTION

          WHEN OTHERS THEN

            V_ORDER_STATUS := 'Under Provisioning';

        END;

4 Replies
jyothish8807
Master II
Master II

Hi  Csairam,

May be like this:

Load *,

 IF( V_PROVISIONING_CNT <> 0,'Provisioned','Under Provisioning') as   V_ORDER_STATUS;

SQL SELECT COUNT(*)

              INTO V_PROVISIONING_CNT

              FROM VSNL_INT_POS_STATUS_UPDATES VI

             WHERE VI.ATTRIBUTE2 = P_SERVICE_ID

               AND VI.OBJECT_ID = V_OPPORTUNITY_ID

               AND VI.STAGE_NAME = 'COLLSHF';

 

Best Regards,
KC
csairam367
Contributor
Contributor
Author

based on this query table is joined with another table.and order status field is not in our table

csairam367
Contributor
Contributor
Author

thanks for replying my query

jyothish8807
Master II
Master II

Yes,  V_ORDER_STATUS will be a new filed created based on the if condition.

 

Best Regards,
KC