SQL Final Statement

When done with JOIN, WHERE, and ORDER BY, you can save your statement locally.

Example based on the scenarios presented in the previous topics:

Invoice Upper Form Data

 

SELECT inv.PROJECT_ID,

 

 

inv.ID AS inv_ID,

inv.RECORD_NO AS inv_record_no,

inv.TITLE AS inv_title,

inv.STATUS AS inv_status,

inv.UVEVENDORNAMETB50 AS vendor,

inv.AMOUNT AS inv_amount,

Invoice Creator Data

 

sysuser.FULLNAME,

 

 

sysuser.EMAIL,

sysuser.WORKPHONE,

Project Data

 

proj.UGENPROJECTNAME

AS ProjectName,

 

proj.UGENPROJECTNUMBER

AS ProjectNumber,

proj.UUU_PROJECT_START_DATE

AS ProjectStartDate,

proj.UGENPROJENDDATEDO

AS ProjectEndDate,

proj.UGENINITBUDGETCA

AS InitialBudget,

proj.UGENREVBUDGETCA

AS RevisedBudget

Note: No comma ( , ) on the last line of the SELECT section.

FROM unifier_ui inv

 

List of tables we’re getting data from, including the fields we’re using to match up the tables.

 

 

LEFT JOIN unifier_sys_user_info_view sysuser

ON (inv.CREATOR_ID = sysuser.USERID)

LEFT JOIN unifier_us_p proj

ON (inv.PROJECT_ID = proj.PID)

WHERE inv.STATUS = 'Approved' OR inv.STATUS = 'Pending'

 

Filtering of the data

ORDER BY inv.PROJECT_ID,

 

Sorting of the data

 

inv.RECORD_NO



Legal Notices
Copyright © 2016, 2018, Oracle and/or its affiliates. All rights reserved.

Last Published Wednesday, March 28, 2018