User Tools

Site Tools


projects:ceo_bi_reports_2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
projects:ceo_bi_reports_2 [2019/06/21 07:59]
192.168.2.159
projects:ceo_bi_reports_2 [2019/06/21 08:01] (current)
192.168.2.159
Line 1665: Line 1665:
 <​code>​ <​code>​
 SELECT SELECT
 +   ​job.s_job_num AS "Job Number",​
 +   ​jobStatus.s_name AS "Job Status",​
 +   ​rDiv.s_name AS Company,
    ​cst.d_cst_comp_act AS construction_actual_completed,​    ​cst.d_cst_comp_act AS construction_actual_completed,​
    ​dateadd(DAY,​ - 90, CAST(CAST(getdate() AS DATE) AS DATETIME)) AS ninety_days_backward_from_today ​    ​dateadd(DAY,​ - 90, CAST(CAST(getdate() AS DATE) AS DATETIME)) AS ninety_days_backward_from_today ​
 FROM FROM
    ​fworksqlecm.dbo.cst ​    ​fworksqlecm.dbo.cst ​
 +   INNER JOIN
 +      fworksqlecm.dbo.job ​
 +      ON job.l_job_id = cst.l_job_id ​
 +   INNER JOIN
 +      list_item AS jobStatus ​
 +      ON job.l_job_status_gl_id = jobStatus.l_list_item_id ​
 +   INNER JOIN
 +      rDiv 
 +      ON job.l_context_id = rDiv.l_context_id ​     ​
 WHERE WHERE
    ​cst.d_cst_comp_act <= dateadd(DAY,​ - 90, CAST(CAST(getdate() AS DATE) AS DATETIME ))    ​cst.d_cst_comp_act <= dateadd(DAY,​ - 90, CAST(CAST(getdate() AS DATE) AS DATETIME ))
Line 1677: Line 1689:
 FROM FROM
    ​fworksqlecm.dbo.cst ​    ​fworksqlecm.dbo.cst ​
 +   INNER JOIN
 +      fworksqlecm.dbo.job ​
 +      ON job.l_job_id = cst.l_job_id ​
 +   INNER JOIN
 +      list_item AS jobStatus ​
 +      ON job.l_job_status_gl_id = jobStatus.l_list_item_id ​
 +   INNER JOIN
 +      rDiv 
 +      ON job.l_context_id = rDiv.l_context_id ​     ​
 WHERE WHERE
    ​cst.d_cst_comp_act <= dateadd(DAY,​ - 90, CAST(CAST(getdate() AS DATE) AS DATETIME ))    ​cst.d_cst_comp_act <= dateadd(DAY,​ - 90, CAST(CAST(getdate() AS DATE) AS DATETIME ))
projects/ceo_bi_reports_2.txt ยท Last modified: 2019/06/21 08:01 by 192.168.2.159