Re: SQL*Plus / Tab Deliminated
Date: 1996/07/03
Message-ID: <4rehkm$i50_at_inet-nntp-gw-1.us.oracle.com>#1/1
In article <31DA7CA8.4E38_at_gold.tc.umn.edu>, Jim Morris <morri055_at_gold.tc.umn.edu> writes:
|> I am using SQL*PLUS to create a flat file. This file will be read by another
|> software application and the data in the flat file must be in a Tab
|> deliminated format. Currently, I am using Tilde delimination in the
|> following query:
|>
|> select CUST.USER_ID||'~'||
|> CUST.NAME||'~'||
|> CUST.ADDRESS||'~'
|> from customer cust;
|>
|> Instead of Tildes, how do I specify the Tab character in my SQL*Plus query?
Use the CHR() function. CHR(9) is a tab, and CHR(10) is a carriage return, depending on the database character set:
SQL> select 'hi' || chr(9) || 'there' from dual;
'HI'||CH
hi there
SQL> select 'hi' || chr(10) || 'there' from dual;
'HI'||CH
hi
there
|>
|> Any help would be appreciated.
|>
|> Regards
|>
|> Jim
-- ------------------------------------------------------------------------ Scott Urman Oracle Corporation surman_at_us.oracle.com ------------------------------------------------------------------------ Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2 Published by Oracle Press - http://www.osborne.com/oracle/index.htm ------------------------------------------------------------------------ "The opinions expressed here are my own, and are not necessarily that of Oracle Corporation" ------------------------------------------------------------------------Received on Wed Jul 03 1996 - 00:00:00 CEST