How to get Output as a pipe delimited file?

UDA

How to get Output as a pipe delimited file?

Hi,

I wrote a SQL in Teradata and the report needs to be in the pipe delimited format.

I was told that I need to add another select with all the column names seperated with pipes (||) to get that.

Can't really find any info.

Can someone help me with this?

Thanks
Rajiv
2 REPLIES
Teradata Employee

Re: How to get Output as a pipe delimited file?

if you are using BTEQ

.SET SEPARATOR 'string'

BTEQ manual has an example for .set separator "|".

Re: How to get Output as a pipe delimited file?

you may use code like this too.

select cast(
CUST_ID||'|'||
CUST_NAME||'|'||
...
...
UPDATE_DATE||'|'||
UPDATE_TIME
as char(250))---(must be big enough to hold all columns plus commas)
from CUST