Re: Any way Out??
Posted in 1996
In article <4h6ik9$3in@cssun.mathcs.emory.edu>, madhavi@hpbbb89.india.external.hp.com (Madhavi Rao) says:
>
>
>
>
>Hi
>
> Is there any way of introducing a delimiter in
>
> select * from <table> ?
Try something like
SELECT field1,",",field2,",",field3 from table
This would give you the columns with commas between each, then
output the select to a file, edit it to remove the column headers,
and if you don't like all the white space in the result use
tr or something similar to get rid of it.
You can use this to write sql if you need to. Suppose you need to
change all the tables in a database to row locking...
SELECT "alter table ",tabname," lock mode (row);" FROM systables
WHERE tabid > 99
output this to a file, edit the col headers, give it a .sql name
and run it. Much easier than typing the whole thing out by hand.