Query that uses more than 100 columns not working properly through bteq

Tools
Enthusiast

Query that uses more than 100 columns not working properly through bteq

Hi

I am using a query in my perl script on windows and hitting to teradata server using Bteq. This query is working on data of two tables having 55 columns each. When I run the script, i am getting below mentioned warning

*** Warning: Report has more than 100 column(s).
Only the first 100 column(s) will be displayed.

and getting the output for only 4 columns.I have already increased the buffer width to 64.
This query works fine in queryman without giving any warning.

The same type of error i also got when i used an another query for the tables more than 50 columns each in Unix shell script.

Please help me out to solve this problem.

Thanks
Kunal
9 REPLIES
Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

This is a BTEQ restriction, it can be over-ridden, check out the BTEQ manual for advice.

Good luck.
Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

Thanks................I got the answer from Bteq manual..............
Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

But I am getting an another problem now..........Report file can have maximum width 254 and my report can have around 150 columns each with some data. So this limit is exceeding. Using a single query ,can i get the output in a report file for all columns?

Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

HI

COUNT TOTAL LENGTH OF EACH COLUMN AND MENTION DATATYPE IN THE EACH COLUMN.

MENTION TOTAL LENGTH IN SET WIDTH COMMNAD .

Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

thanks but the problem is limitation on width of bteq................

Actually range of bteq width is 20 to 254.................
Fan

Re: Query that uses more than 100 columns not working properly through bteq

Hello,
I am encountering the same issue, did anyone find a solution for this?

Thanks in advanced...
Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

You cannot overcome the restriction on an Export Report.

There are two answers - use a Foldline to get the output on multiple lines. You can then put them back together using Perl or sed.
Or Export Data - you then have to format the columns yourself - converting numbers to characters and varchars to fixed width chars.
Teradata Employee

Re: Query that uses more than 100 columns not working properly through bteq

As per description in manual (V2R5) it says width range is 254, for V2R6.2 onwards it supports higher width
I have used .set width 1000; and is working fine for me.
Enthusiast

Re: Query that uses more than 100 columns not working properly through bteq

Hi,

please check the version of teradat you are using. Check the manual. Bteq older than V2R6 limits to 254 as far as I remember.

Thanks and regards,
Raja