Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
709 views

SQL For Oracle

This document contains SQL queries that retrieve various data reference values from Oracle E-Business Suite tables including: - Business unit name - Supplier name and number - Company code - Account code and description - Function code - Project code - Cost center/department - Source - Period name - Transaction type - Payment number and method The SQL queries are selecting distinct values for lookup and reference data from various Oracle EBS tables for use in applications and reporting.

Uploaded by

balasuk
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
709 views

SQL For Oracle

This document contains SQL queries that retrieve various data reference values from Oracle E-Business Suite tables including: - Business unit name - Supplier name and number - Company code - Account code and description - Function code - Project code - Cost center/department - Source - Period name - Transaction type - Payment number and method The SQL queries are selecting distinct values for lookup and reference data from various Oracle EBS tables for use in applications and reporting.

Uploaded by

balasuk
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Bu name

select OrganizationUnitTranslation.NAME from HR_ORGANIZATION_INFORMATION_F


OrganizationInformation,
HR_ORGANIZATION_UNITS_F_TL OrganizationUnitTranslation where
OrganizationInformation.ORG_INFORMATION_CONTEXT = 'FUN_BUSINESS_UNIT'
and OrganizationUnitTranslation.ORGANIZATION_ID =
OrganizationInformation.ORGANIZATION_ID order by
OrganizationUnitTranslation.NAME

supplier name
select distinct VENDOR_NAME from POZ_SUPPLIERS_V where VENDOR_TYPE_LOOKUP_CODE <>
'EMPLOYEE' order by 1 asc

supplier number
select distinct SEGMENT1 from POZ_SUPPLIERS_V where VENDOR_TYPE_LOOKUP_CODE <>
'EMPLOYEE' order by 1 asc

company code
select distinct PK1_START_VALUE from FND_TREE_NODE where TREE_CODE = 'Company
YRCW' and PK2_START_VALUE = 'Company YRCW'
select distinct glcc.segment1 "Company_Code" from gl_code_combinations glcc order
by 1

select affv.flex_value
from fnd_id_flex_structures Affs,
fnd_id_flex_segments Afifs,
fnd_flex_values Affv,
fnd_flex_value_sets Afvs,
fnd_flex_values_tl Afvt

where affs.id_flex_structure_code = 'YRCW'


and afifs.id_flex_code = 'GL#'
and afifs.id_flex_code = affs.id_flex_code
and afifs.id_flex_num = affs.id_flex_num
and afifs.flex_value_set_id = affv.flex_value_set_id
and afvs.flex_value_set_id = affv.flex_value_set_id
and afvt.flex_value_id = affv.flex_value_id
AND afvs.flex_value_set_name = 'Company YRCW'
AND Afifs.Application_Column_Name = 'SEGMENT1'

and affv.enabled_flag = 'Y'


order by affv.flex_value
Account code
select distinct PK1_START_VALUE from FND_TREE_NODE where TREE_CODE = 'Account
YRCW' and PK2_START_VALUE = 'Account YRCW'
select distinct glcc.segment2 "Account_Code" from gl_code_combinations glcc order
by 1
select affv.flex_value value
from fnd_id_flex_structures Affs,
fnd_id_flex_segments Afifs,
fnd_flex_values Affv,
fnd_flex_value_sets Afvs,
fnd_flex_values_tl Afvt

where affs.id_flex_structure_code = 'YRCW'


and afifs.id_flex_code = 'GL#'
and afifs.id_flex_code = affs.id_flex_code
and afifs.id_flex_num = affs.id_flex_num
and afifs.flex_value_set_id = affv.flex_value_set_id
and afvs.flex_value_set_id = affv.flex_value_set_id
and afvt.flex_value_id = affv.flex_value_id
AND afvs.flex_value_set_name = 'Account YRCW'

order by 1

Function code
select distinct glcc.segment3 "Function_Code" from gl_code_combinations glcc
order by 1

Project code
select distinct PK1_START_VALUE from FND_TREE_NODE where TREE_CODE = 'Project
YRCW' and PK2_START_VALUE = 'Project YRCW'
select distinct glcc.segment5 "Project_Code" from gl_code_combinations glcc order
by 1

costcenter/department
select distinct glcc.segment4 "CostCenter" from gl_code_combinations glcc order
by 1

select distinct PK1_START_VALUE from FND_TREE_NODE


where TREE_CODE = 'Cost Center YRCW' and PK2_START_VALUE = 'Cost Center YRCW'

source
SELECT PayablesLookup.LOOKUP_CODE FROM AP_LOOKUP_CODES PayablesLookup
WHERE PayablesLookup.LOOKUP_TYPE = 'SOURCE' order by 1

select LOOKUP_CODE from FND_LOOKUP_VALUES_VL


where LOOKUP_TYPE = 'SOURCE' and created_by <> 'SEED_DATA_FROM_APPLICATION' order
by 1

Period name
select distinct period_name from GL_PERIODS
where substr(period_name ,4,7) <= to_char(sysdate,'YYYY')
order by substr(period_name ,4,7) desc , substr(period_name ,1,3) asc

Type
select distinct ENTITY_CODE from XLA_TRANSACTION_ENTITIES
union all
select distinct SOURCE_DISTRIBUTION_TYPE from XLA_DISTRIBUTION_LINKS

Payment Number
select distinct PAYMENT_NUM from ap_invoice_payments_all order by 1 desc

Payment Method
select distinct PAYMENT_METHOD_CODE from IBY_PAYMENT_METHODS_VL

glcc.segment1 "Company_Code",
glcc.segment2 "Account_Code",
FlexValueMeaning.DESCRIPTION "Account_Description",
glcc.segment3 "GL_Function",
glcc.segment4 "Cost_Center_Code",
glcc.segment6 "Intercompany",
glcc.segment5 "Project_Code",

You might also like