SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Query to get the Geography Information using BI Report
Countries:
SELECT TERRITORY_CODE
,TERRITORY_SHORT_NAME
,CURRENCY_CODE
,DESCRIPTION
FROM FND_TERRITORIES_VL
WHERE OBSOLETE_FLAG = 'N'
ORDER BY TERRITORY_SHORT_NAME
,TERRITORY_CODE
States:
SELECT hzgiv.identifier_value
FROM hz_geographieshzg
,hz_geography_identifiershzgi
,hz_geography_identifiers_vl hzgiv
WHERE hzg.country_code = 'US'
AND hzg.geography_use = 'MASTER_REF'
AND hzg.geography_type = 'STATE'
AND hzg.geography_element1= 'UnitedStates'
AND hzg.geography_id= hzgi.geography_id
AND hzgi.identifier_subtype='GEO_CODE'
AND hzgi.identifier_type ='CODE'
AND hzgi.primary_flag = 'N'
AND hzgi.geography_use = 'MASTER_REF'
AND hzgi.language_code = 'US'
AND hzgi.geography_id= hzgiv.geography_id
AND hzgiv.geography_use = 'MASTER_REF'
AND hzgiv.identifier_type ='NAME'
AND hzgiv.identifier_subtype='STANDARD_NAME'
AND hzgiv.language_code = 'US'
AND hzgiv.primary_flag = 'Y'
Counties:
SELECT hzgiv.identifier_value
FROM hz_geographieshzg
,hz_geography_identifiershzgi
,hz_geography_identifiers_vl hzgiv
WHERE hzg.country_code = 'US'
AND hzg.geography_use = 'MASTER_REF'
AND hzg.geography_type = 'COUNTY'
AND hzg.geography_element1= 'UnitedStates'
AND hzg.geography_id= hzgi.geography_id
AND hzgi.identifier_subtype='GEO_CODE'
AND hzgi.identifier_type ='CODE'
AND hzgi.primary_flag = 'Y'
AND hzgi.geography_use = 'MASTER_REF'
AND hzgi.language_code = 'US'
AND hzgi.geography_id= hzgiv.geography_id
AND hzgiv.geography_use = 'MASTER_REF'
AND hzgiv.identifier_type ='NAME'
AND hzgiv.identifier_subtype='STANDARD_NAME'
AND hzgiv.language_code = 'US'
AND hzgiv.primary_flag = 'Y'
AND substr(hzgi.identifier_value,1,2) = : $FLEX$.STATE
Cities:
SELECT initcap(hzgiv.identifier_value)
FROM hz_geographieshzg
,hz_geography_identifiershzgi
,hz_geography_identifiers_vl hzgiv
WHERE hzg.country_code = 'US'
AND hzg.geography_use = 'MASTER_REF'
AND hzg.geography_type = 'CITY'
AND hzg.geography_element1= 'UnitedStates'
AND hzg.geography_id= hzgi.geography_id
AND hzgi.identifier_subtype='GEO_CODE'
AND hzgi.identifier_type ='CODE'
AND hzgi.primary_flag = 'Y'
AND hzgi.geography_use = 'MASTER_REF'
AND hzgi.language_code = 'US'
AND hzgi.geography_id= hzgiv.geography_id
AND hzgiv.identifier_type ='NAME'
AND hzgiv.identifier_subtype='STANDARD_NAME'
AND hzgiv.language_code = 'US'
AND hzgiv.primary_flag = 'Y'
AND hzgiv.geography_use = 'MASTER_REF'
AND substr(hzgi.identifier_value,1,2) = : $FLEX$.STATE
AND substr(hzgi.identifier_value,4,3) = : $FLEX$.County
Zip:
SELECT hzgpc.geography_name
FROM hz_geographieshzg
,hz_geography_identifiershzgi
,hz_geography_identifiers_vl hzgiv
,hz_geographieshzgpc
WHERE hzg.country_code = 'US'
AND hzg.geography_use = 'MASTER_REF'
AND hzg.geography_type = 'CITY'
AND hzg.geography_element1= 'UnitedStates'
AND hzg.geography_id= hzgi.geography_id
AND hzgi.identifier_subtype='GEO_CODE'
AND hzgi.identifier_type ='CODE'
AND hzgi.primary_flag = 'Y'
AND hzgi.geography_use = 'MASTER_REF'
AND hzgi.language_code = 'US'
AND hzgi.geography_id= hzgiv.geography_id
AND hzgiv.identifier_type ='NAME'
AND hzgiv.identifier_subtype='STANDARD_NAME'
AND hzgiv.language_code = 'US'
AND hzgiv.primary_flag = 'Y'
AND hzgiv.geography_use = 'MASTER_REF'
AND hzgpc.country_code = 'US'
AND hzgpc.geography_use = 'MASTER_REF'
AND hzgpc.geography_type = 'POSTAL_CODE'
AND hzgpc.geography_element1= hzg.geography_element1
AND hzgpc.geography_element2= hzg.geography_element2
AND hzgpc.geography_element3= hzg.geography_element3
AND hzgpc.geography_element4= hzg.geography_element4
AND hzgpc.geography_name IS NOT NULL
AND substr(hzgi.identifier_value,1,2) = : $FLEX$.STATE
AND substr(hzgi.identifier_value,4,3) = : $FLEX$.County
AND substr(hzgi.identifier_value,8,4) = : $FLEX$.City
Hope thishelps.Stay tunedfor more updates.
Query to get the geography information using bi report

More Related Content

DOCX
How to debug a fast formula
PDF
Query Pre Payment details Oracle Fusion Cloud
PDF
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
PDF
Oracle Fusion Cloud HCM Payroll Query
PDF
Query Worker Contracts Details Oracle Fusion Cloud
PDF
The Goal with performance details Oracle Fusion Cloud
PDF
Legal Employer Details Query Oracle Fusion Cloud
DOCX
Fast formula queries for functions, contexts, db is and packages
How to debug a fast formula
Query Pre Payment details Oracle Fusion Cloud
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Oracle Fusion Cloud HCM Payroll Query
Query Worker Contracts Details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion Cloud
Legal Employer Details Query Oracle Fusion Cloud
Fast formula queries for functions, contexts, db is and packages

What's hot (20)

PDF
Oracle Fusion Cloud Payroll Costing Query
PDF
Payroll costing details Oracle Fusion Cloud HCM
PDF
Oracle Cloud SQL FTE Positions Query
PDF
All payroll elements with eligibility Oracle Fusion Cloud
PPT
Hrms for beginners
DOCX
Accrual plan set up in oracle hrms
DOCX
Most frequently used sq ls for a list of values
RTF
Calendar working days and holidays for Oracle EBS R12 Absence management
DOC
How to create payslip through self service
DOCX
Oracle HRMS Fast Formula
PDF
Oracle HCM Cloud Core HR Workforce Structures Table Relationships
PDF
DBI database Items Query Oracle Fusion Cloud
PDF
Query all roles and duties and privileges Oracle Fusion Cloud
PDF
Oracle fusion hrms_for_uae_payroll_setup_white_paper_rel11
PDF
Uae absence whitepaper
PPT
Oracle HRMS Payroll Table Overview
DOCX
Check element entry value on particular effective date
DOCX
Hcm extracts error
PDF
Creating business group in oracle apps
PDF
Otl Oracle Time and Labor
Oracle Fusion Cloud Payroll Costing Query
Payroll costing details Oracle Fusion Cloud HCM
Oracle Cloud SQL FTE Positions Query
All payroll elements with eligibility Oracle Fusion Cloud
Hrms for beginners
Accrual plan set up in oracle hrms
Most frequently used sq ls for a list of values
Calendar working days and holidays for Oracle EBS R12 Absence management
How to create payslip through self service
Oracle HRMS Fast Formula
Oracle HCM Cloud Core HR Workforce Structures Table Relationships
DBI database Items Query Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion Cloud
Oracle fusion hrms_for_uae_payroll_setup_white_paper_rel11
Uae absence whitepaper
Oracle HRMS Payroll Table Overview
Check element entry value on particular effective date
Hcm extracts error
Creating business group in oracle apps
Otl Oracle Time and Labor
Ad

More from Feras Ahmad (18)

PDF
Oracle Fusion HCM Payroll Process Flow.pdf
DOCX
Configure Flexfield Parameters in Value Sets for Document Records.docx
PPT
Building-Materials
PDF
How to Debug the Fast Formula.pdf
PDF
Oracle Fusion Cloud sensitive data access audit
PPTX
Oracle HCM Presentation 2020
PPT
Oracle Fusion HCM vs E-Business Suite HRMS
PDF
2020 06-11 goverment KSA Summary VAT increase
PPTX
Financial reporting compliance cloud service presentation
DOCX
Absence Work flow query
DOCX
Setting up audits and audit reports Fusion Cloud
DOC
Oracle EBS R12 Payroll user manual
DOC
Oracle EBS R12 Self service user manual
DOCX
Oracle EBS R 12 Core hr user manual
DOCX
Oracle Fusion HCM Presentation
DOC
Oracle HRMS Accrual plan Setup
PPT
Oracle Fusion HCM Presentation
PDF
Best practices for fusion hcm cloud implementation
Oracle Fusion HCM Payroll Process Flow.pdf
Configure Flexfield Parameters in Value Sets for Document Records.docx
Building-Materials
How to Debug the Fast Formula.pdf
Oracle Fusion Cloud sensitive data access audit
Oracle HCM Presentation 2020
Oracle Fusion HCM vs E-Business Suite HRMS
2020 06-11 goverment KSA Summary VAT increase
Financial reporting compliance cloud service presentation
Absence Work flow query
Setting up audits and audit reports Fusion Cloud
Oracle EBS R12 Payroll user manual
Oracle EBS R12 Self service user manual
Oracle EBS R 12 Core hr user manual
Oracle Fusion HCM Presentation
Oracle HRMS Accrual plan Setup
Oracle Fusion HCM Presentation
Best practices for fusion hcm cloud implementation
Ad

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Modernizing your data center with Dell and AMD
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
KodekX | Application Modernization Development
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Big Data Technologies - Introduction.pptx
Understanding_Digital_Forensics_Presentation.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Modernizing your data center with Dell and AMD
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Reach Out and Touch Someone: Haptics and Empathic Computing
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
NewMind AI Monthly Chronicles - July 2025
KodekX | Application Modernization Development
Mobile App Security Testing_ A Comprehensive Guide.pdf

Query to get the geography information using bi report

  • 1. Query to get the Geography Information using BI Report Countries: SELECT TERRITORY_CODE ,TERRITORY_SHORT_NAME ,CURRENCY_CODE ,DESCRIPTION FROM FND_TERRITORIES_VL WHERE OBSOLETE_FLAG = 'N' ORDER BY TERRITORY_SHORT_NAME ,TERRITORY_CODE States: SELECT hzgiv.identifier_value FROM hz_geographieshzg ,hz_geography_identifiershzgi ,hz_geography_identifiers_vl hzgiv WHERE hzg.country_code = 'US' AND hzg.geography_use = 'MASTER_REF' AND hzg.geography_type = 'STATE' AND hzg.geography_element1= 'UnitedStates' AND hzg.geography_id= hzgi.geography_id AND hzgi.identifier_subtype='GEO_CODE' AND hzgi.identifier_type ='CODE' AND hzgi.primary_flag = 'N' AND hzgi.geography_use = 'MASTER_REF' AND hzgi.language_code = 'US' AND hzgi.geography_id= hzgiv.geography_id AND hzgiv.geography_use = 'MASTER_REF'
  • 2. AND hzgiv.identifier_type ='NAME' AND hzgiv.identifier_subtype='STANDARD_NAME' AND hzgiv.language_code = 'US' AND hzgiv.primary_flag = 'Y' Counties: SELECT hzgiv.identifier_value FROM hz_geographieshzg ,hz_geography_identifiershzgi ,hz_geography_identifiers_vl hzgiv WHERE hzg.country_code = 'US' AND hzg.geography_use = 'MASTER_REF' AND hzg.geography_type = 'COUNTY' AND hzg.geography_element1= 'UnitedStates' AND hzg.geography_id= hzgi.geography_id AND hzgi.identifier_subtype='GEO_CODE' AND hzgi.identifier_type ='CODE' AND hzgi.primary_flag = 'Y' AND hzgi.geography_use = 'MASTER_REF' AND hzgi.language_code = 'US' AND hzgi.geography_id= hzgiv.geography_id AND hzgiv.geography_use = 'MASTER_REF' AND hzgiv.identifier_type ='NAME' AND hzgiv.identifier_subtype='STANDARD_NAME' AND hzgiv.language_code = 'US' AND hzgiv.primary_flag = 'Y' AND substr(hzgi.identifier_value,1,2) = : $FLEX$.STATE Cities:
  • 3. SELECT initcap(hzgiv.identifier_value) FROM hz_geographieshzg ,hz_geography_identifiershzgi ,hz_geography_identifiers_vl hzgiv WHERE hzg.country_code = 'US' AND hzg.geography_use = 'MASTER_REF' AND hzg.geography_type = 'CITY' AND hzg.geography_element1= 'UnitedStates' AND hzg.geography_id= hzgi.geography_id AND hzgi.identifier_subtype='GEO_CODE' AND hzgi.identifier_type ='CODE' AND hzgi.primary_flag = 'Y' AND hzgi.geography_use = 'MASTER_REF' AND hzgi.language_code = 'US' AND hzgi.geography_id= hzgiv.geography_id AND hzgiv.identifier_type ='NAME' AND hzgiv.identifier_subtype='STANDARD_NAME' AND hzgiv.language_code = 'US' AND hzgiv.primary_flag = 'Y' AND hzgiv.geography_use = 'MASTER_REF' AND substr(hzgi.identifier_value,1,2) = : $FLEX$.STATE AND substr(hzgi.identifier_value,4,3) = : $FLEX$.County Zip: SELECT hzgpc.geography_name FROM hz_geographieshzg ,hz_geography_identifiershzgi ,hz_geography_identifiers_vl hzgiv ,hz_geographieshzgpc
  • 4. WHERE hzg.country_code = 'US' AND hzg.geography_use = 'MASTER_REF' AND hzg.geography_type = 'CITY' AND hzg.geography_element1= 'UnitedStates' AND hzg.geography_id= hzgi.geography_id AND hzgi.identifier_subtype='GEO_CODE' AND hzgi.identifier_type ='CODE' AND hzgi.primary_flag = 'Y' AND hzgi.geography_use = 'MASTER_REF' AND hzgi.language_code = 'US' AND hzgi.geography_id= hzgiv.geography_id AND hzgiv.identifier_type ='NAME' AND hzgiv.identifier_subtype='STANDARD_NAME' AND hzgiv.language_code = 'US' AND hzgiv.primary_flag = 'Y' AND hzgiv.geography_use = 'MASTER_REF' AND hzgpc.country_code = 'US' AND hzgpc.geography_use = 'MASTER_REF' AND hzgpc.geography_type = 'POSTAL_CODE' AND hzgpc.geography_element1= hzg.geography_element1 AND hzgpc.geography_element2= hzg.geography_element2 AND hzgpc.geography_element3= hzg.geography_element3 AND hzgpc.geography_element4= hzg.geography_element4 AND hzgpc.geography_name IS NOT NULL AND substr(hzgi.identifier_value,1,2) = : $FLEX$.STATE AND substr(hzgi.identifier_value,4,3) = : $FLEX$.County AND substr(hzgi.identifier_value,8,4) = : $FLEX$.City Hope thishelps.Stay tunedfor more updates.