Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
krish2459
Creator
Creator

migrating query in qlik

Hi We are migrating oracle queries to azure synapse .

Need help to migrate the oacle query to sql query.

Here is the code to mirage to sql .

[Location]:
select
BUILDING.LOCATION_ID C1_BUILDING_ID,
BUILDING.LOCATION_CODE C2_BUILDING_CODE,
BUILDING.BUILDING C3_BUILDING_NAME,
FLOOR.LOCATION_ID C4_FLOOR_ID,
FLOOR.FLOOR C5_FLOOR_NAME,
FLOOR.LOCATION_CODE C6_FLOOR_CODE,
OFFICE.LOCATION_ID C7_LOCATION_ID,
OFFICE.ATTRIBUTE10 C30_ATTRIBUTE10,
OFFICE.ATTRIBUTE_CATEGORY C36_ATTRIBUTE_CATEGORY,
PN_PROPERTIES_ALL.PROPERTY_NAME C37_PROPERTY_NAME,
PN_PROPERTIES_ALL.PROPERTY_ID C43_PROPERTY_ID,
XXDC_HPB_UNIT_STATUS_V.UNIT_STATUS C38_UNIT_STATUS,
OFFICE.ASSIGNABLE_AREA C39_AREA,
PN_PROPERTIES_ALL.DISTRICT C40_DIRTRICT,
case when PN_PROPERTIES_ALL.COUNTRY = 'AE' then PN_PROPERTIES_ALL.DISTRICT else PN_PROPERTIES_ALL.COUNTRY end C41_NEW_LOCATION,
PN_PROPERTIES_ALL.COUNTRY C42_COUNTRY,
'DAMAC'||'~'||OFFICE.LOCATION_ID C43_DICO_LOCATION_ID,
XNL.attribute25 UNIT_FURNISHED_FLG,
BUILDING.LOCATION_TYPE_LOOKUP_CODE,
(Select Max( Attr.Attribute10) From Pn_Locations_All Attr
where ATTR.LOCATION_ID=BUILDING.LOCATION_ID and ATTR.LOCATION_TYPE_LOOKUP_CODE='BUILDING' GROUP BY ATTR.LOCATION_ID) CONSTRUCTION_PER
from APPS.PN_LOCATIONS_ALL BUILDING, APPS.PN_LOCATIONS_ALL FLOOR, APPS.PN_LOCATIONS_ALL OFFICE,
APPS.PN_PROPERTIES_ALL PN_PROPERTIES_ALL, APPS.XXDC_HPB_UNIT_STATUS_V XXDC_HPB_UNIT_STATUS_V,xx_pn_locations_all XNL
where (1=1)
And (TRUNC(SYSDATE) BETWEEN TRUNC(OFFICE.ACTIVE_START_DATE) AND TRUNC(OFFICE.ACTIVE_END_DATE))
And (OFFICE.LOCATION_TYPE_LOOKUP_CODE='OFFICE')
And (TRUNC(SYSDATE) BETWEEN TRUNC(BUILDING.ACTIVE_START_DATE) AND TRUNC(BUILDING.ACTIVE_END_DATE))
And (TRUNC(SYSDATE) BETWEEN TRUNC(FLOOR.ACTIVE_START_DATE) AND
TRUNC(FLOOR.ACTIVE_END_DATE))
And (FLOOR.LOCATION_TYPE_LOOKUP_CODE='FLOOR')
And (OFFICE.PARENT_LOCATION_ID=FLOOR.LOCATION_ID)
AND (FLOOR.PARENT_LOCATION_ID=BUILDING.LOCATION_ID)
AND (BUILDING.PROPERTY_ID=PN_PROPERTIES_ALL.PROPERTY_ID (+))
AND (OFFICE.LOCATION_ID=XXDC_HPB_UNIT_STATUS_V.LOCATION_ID (+))
AND (OFFICE.LOCATION_ID=XNL.LOCATION_ID )
;

Thanks...

Labels (1)
1 Reply
micheledenardi
Specialist II
Specialist II

Nobody will help you to migrate this huge query without the dataset and the possibility to test it.

I believe you have to ask to your consultants to help you on this.

 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.