Automic Workload Automation

 View Only

Expand all | Collapse all

SQL Query assistance please ! joining a Job priority query to a convert from UTC to EST query.

  • 1.  SQL Query assistance please ! joining a Job priority query to a convert from UTC to EST query.

    Posted Jun 13, 2025 04:49 PM

    I've got a request for a query -- that's driving me crazy.  They want to add it in Tableau as a Dashboard for SLA's 

    I've got the query figured out, but they want to see EST time instead of UTC time,  I  also have a query to convert from UTC to EST. 

    But for the life of me I cannot figure how to join them or add the convert query to the Priority query.  

    Thanks anyone for your assistance 

    Query #1 

    Select AH_Name, AH_UC4Priority, AH_Otype, AH_TIMESTAMP4

    From AH

    where AH_timestamp4 >=DATEADD(day,-1, GETDATE())

    and AH_OTYPE like '%JOBS%'

    and AH_UC4Priority not like '200'

    and AH_UC4Priority not like '0'

    order by AH_TIMESTAMP4

    DESC

    select getdate() as EndDateTime

    , CONVERT(datetime, getdate() AT TIME ZONE 'Eastern Standard Time' AT TIME ZONE 'UTC') as EndDateTime



  • 2.  RE: SQL Query assistance please ! joining a Job priority query to a convert from UTC to EST query.

    Broadcom Employee
    Posted Jun 15, 2025 08:40 PM

    I think this is what you're looking for.

    SELECT  AH_Name
    	,AH_UC4Priority
    	,AH_Otype
    	,AH_TIMESTAMP4 AT TIME ZONE 'UTC' AT TIME ZONE 'Eastern Standard Time' AS EST
    FROM AH
    WHERE AH_TIMESTAMP4 >= DATEADD(day, -1, GETUTCDATE())
    AND AH_OTYPE = 'JOBS'
    AND AH_UC4Priority NOT IN (0,200)
    ORDER BY AH_TIMESTAMP4 DESC