Bhai Posted December 7, 2016 Report Posted December 7, 2016 39 minutes ago, 4Vikram said: naaku antha manchiga asthe bane unde,, nake oka samasya unadi nuvu chesta ante chepu chepta bodi ki tweet cheyyi help chestadu Quote
4Vikram Posted December 7, 2016 Report Posted December 7, 2016 7 hours ago, Bhai said: bodi ki tweet cheyyi help chestadu E endi mei nee racha eeda Quote
khabardar Posted December 7, 2016 Report Posted December 7, 2016 16 hours ago, nenu_devudni said: ee with clause lo una query lo highlight chesina col's add chesa ... and where clause lo add chesina new table vala records join vala thakuva ostunay .. joins try chesina work avatledu .. deni ela fix cheyalo teliste cheppandi vaya WITH cte AS (SELECT ucbcust_cust_code cust_code, REPLACE(ucbcust_last_name,'|','') last_name, REPLACE(ucbcust_status_ind,'|','') status_ind, ucbcust_start_date start_date, ucbcust_activity_date activity_date, REPLACE(ucbcust_first_name,'|','') first_name, REPLACE(ucbcust_middle_name,'|','') middle_name, REPLACE(ucbcust_toto_ind,'|','') toto_ind, REPLACE(ucbcust_builder_type,'|','') builder_type, REPLACE(ucbcust_pay_by_check_ind,'|','') check_ind, ucbcust_end_date end_date, REPLACE(ucbcust_email_address,'|','') email_addr, REPLACE(ucbcust_primary_prem_code,'|','') pr_prem_code, UPPER (ucrtele_phone_area) tele_area, UPPER (ucrtele_phone_number) tele_num, UPPER (ucrtele_phone_ext) tele_ext, UPPER (ucrtele_tele_code) tele_code, UCRADDR_STREET_NUMBER, UCRADDR_PDIR_CODE_PRE, UCRADDR_STREET_NAME, UCRADDR_SSFX_CODE, UCRADDR_PDIR_CODE_POST, UCRADDR_UTYP_CODE, UCRADDR_UNIT, UCRADDR_CITY, UCRADDR_STAT_CODE, UCRADDR_ZIP, UCRADDR_SEQNO, ROW_NUMBER () OVER (PARTITION BY ucbcust_cust_code ORDER BY ucrtele_tele_code) as rnum FROM ucbcust, ucrtele, ucraddr a WHERE ucbcust_cust_code = ucrtele_cust_code(+) AND ucbcust_cust_code(+) = ucraddr_cust_code AND a.UCRADDR_SEQNO = (SELECT MIN(b.ucraddr_seqno) FROM ucraddr b WHERE b.ucraddr_cust_code = ucbcust_cust_code AND b.ucraddr_atyp_code = 'MA' AND b.ucraddr_status_ind = 'A') ORDER BY DECODE (ucrtele_tele_code, 'BU', 'AA', 'HM', 'AB', 'ZZ')) SELECT * FROM cte WHERE rnum = 1 asalu nev run chesava.. bcoz.. order by unte execute cheyanivaddu kada.CTE Lo......... order by column SELECT * FROM cte WHERE rnum = 1 ORder by................... ekkada add cheyali.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.