Re: How do we do an ascii dump of a table with a delimiter ?
Date: 1995/05/06
Message-ID: <71_at_along.dialix.oz.au>#1/1
In article <3obkcg$hov_at_ixnews3.ix.netcom.com>, Chuck Hamilton (chuckh_at_ix.netcom.com) writes:
>In <3o8djo$a13_at_news1.cle.ab.com> Raghid Ajamoughli
>>you may want to try the following
>>
>>set pagesize 0
>>set linesize 1000
>>spool filename
>>
>>select col1, ',', col2, ',', col3, ',', col4 ...
>>from your table;
>>
>>spool off
>>
>>this will output the table into filename on your system.
>>hope this helps
>
>Suppose you want to use TAB as the delimiter?
>
>--
>><> Chuck Hamilton <><
>><> chuckh_at_ix.netcom.com <><
Hi Chuck,
If you wanted a tab character or any other chracter that you can find on the ASCII table listing, you add that character as an ASCII value
For example
SELECT COLUMN_NAME||' '''||CHR(9)||''' '||COLUMN_NAME
would give you ASCII 9 separated by a single quote between columns.
Check recent postings by Bob Treumann for an excellent and very compregensive script. I haven't tried it (yet) but the code looks very good.
Regards,
Alex Long
--
, \ / ,
/ \ )\__/( / \
/ \ (_\ /_) / \
______________________/_____\__\_at_ @/___/_____\________________
|paladin.along.dialix.oz.au |
|Alex Long |
|Adelaide, South Australia |
|_______________________________________________________________|
|Wiv a ladder and some glasses, |
|You could see to 'Ackney Marshes, |
|If it wasn't for the 'ouses in between. |
|Edgar Bateman |
+_______________________________________________________________+
| /\ / \\ \ /\ |
| / V )) V \ |
|/ ` // ' \|
` V '
_
Received on Sat May 06 1995 - 00:00:00 CEST
