2 Replies Latest reply on Mar 13, 2013 10:29 AM by barry.goodsell

    UTL File --taken as a single line of address because of the quotes--Plshelp

    984530
      Hello ,

      i have requirement like below

      i want to send the data into .CSV format the below address file with single quotes.

      we require consistency in the format, thus the use of ‘ ‘ for address fields is fine providing you apply this rule all the time. The use of ‘ ‘ within address fields is normally used where there is an address entered in the manner of 123, Rock Road, as against 123 Rock Road. Thus, what we were looking for was

      ,‘123, Rock Road’, (taken as a single line of address because of the quotes)
      or simply
      ,123 Rock Road, (does not require quotes as there is no comma after the numeric element)

      i have created below query for above requirement , Can you pls correct the below query.


      SELECT ''''||NVL(substr(pa.address_line1, 1, 25),CHR(254)) ||'''' address_line1,
      ''''||NVL(substr(pa.address_line1, 1, 25),CHR(254)) ||'''' address_line2,
      ''''||NVL(substr(pa.address_line1, 1, 25),CHR(254)) ||'''' address_line3,
      ''''||NVL(pa.town_or_city,CHR(254)) ||'''' town_or_city,
      pa.region_2,
      pa.postal_code,
      pa.country
      FROM per_addresses pa
      WHERE
      date_to is null
      AND pa.primary_flag = 'Y'
      AND trunc(pa.last_update_date) between &p_from_date and &p_to_date
      and rownum < 2
      order by pa.last_update_date desc;

      Thanks,

      Edited by: 981527 on Mar 12, 2013 12:32 AM