AutoSys Workload Automation

 View Only
  • 1.  CAN CA WORKLOAD DE 'SQL JOB' UPDATE TABLE IN THE DATABASE?

    Posted Nov 08, 2016 07:37 AM

    I have this scenario where I would like to update this one table by updating one of its column values.

     

    UPDATE test_business_calendar

    SET is_test_consolidate_date = 'Y'

    WHERE business_date = '2016-11-24'

     

    . Somehow I read SQL job in CA where it can only execute query and save the output only. I was wondering if SQL Job can achieve this

     



  • 2.  Re: CAN CA WORKLOAD DE 'SQL JOB' UPDATE TABLE IN THE DATABASE?
    Best Answer

    Posted Nov 09, 2016 09:57 AM

    Hi Nabilah,

     

    You can use sql job to update a table/column.  In my example, I created a ESP_STATUS_MESSAGE_COUNT table which has one column ID.  The statement below updates the row count of ESP_STATUS_MESSAGE table into ESP_STATUS_MESSAGE_COUNT.

     

    update ESP_STATUS_MESSAGE_COUNT set ID=(SELECT COUNT(*) FROM ESP_STATUS_MESSAGE) 

     

     

    HTH,

    Pradeepan Gunabalsignam