Wednesday, July 14, 2021

Query to get Date and Day from Given Date

 SELECT TO_CHAR(SYSDATE-TO_CHAR(SYSDATE,'dd')+LEVEL,'DD-Mon-YYYY')"DATE" 

      ,TO_CHAR(SYSDATE-TO_CHAR(SYSDATE,'dd')+LEVEL,'fmDay') "WEEK" 

  FROM dual 

 WHERE TO_CHAR(SYSDATE-TO_CHAR(SYSDATE,'dd')+LEVEL,'fmDAY') = UPPER('&DAY') 

       CONNECT BY LEVEL<=TO_CHAR(LAST_DAY(SYSDATE),'dd');

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)