All Forums Tools
kishu 26 posts Joined 03/08
26 Jul 2008
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.ThanksKunal

idontknow 25 posts Joined 07/07
26 Jul 2008

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

kishu 26 posts Joined 03/08
27 Jul 2008

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

kishu 26 posts Joined 03/08
27 Jul 2008

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?

28 Jul 2008

HI COUNT TOTAL LENGTH OF EACH COLUMN AND MENTION DATATYPE IN THE EACH COLUMN. MENTION TOTAL LENGTH IN SET WIDTH COMMNAD .

kishu 26 posts Joined 03/08
28 Jul 2008

thanks but the problem is limitation on width of bteq................Actually range of bteq width is 20 to 254.................

indo81 4 posts Joined 04/08
13 Aug 2009

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

Jimm 298 posts Joined 09/07
13 Aug 2009

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.

@nkit 12 posts Joined 09/08
24 Aug 2009

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

Raja_KT 1246 posts Joined 07/09
25 Aug 2009

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

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.