Skip to Content.
Sympa Menu

freetds - [freetds] FISQL tool truncated the result set

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Sheshabhattar, Sharda " <sharda.sheshabhattar AT citi.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] FISQL tool truncated the result set
  • Date: Wed, 7 Apr 2010 15:48:40 -0500

Hi,
We have observed a behavior in FreeTDS fisql where the select query is
returning the output with the data truncated.
A workaround for the issue seems to be to use a longer column name (can be
padded with some blank spaces). Is this a Bug or the expected behavior?

Thanks,
Sharda Sheshabhattar
Citigroup.
Ph: 908-5630374

Details of the issue:

I ran:

SELECT * FROM BRPS WHERE BR='00'

BR 00
BRSTATUS ONLINE
BRPROCDATE 40025
PREVBRPROC 40024
LSTMNTDTE Jul 31 2009 01:51AM
PRVMENDDTE 39994
BRANPRCDATE Jul 31 2009 12:00AM
PREVBRANPRCDATE Jul 30 2009 12:00AM
PREVMNTHENDDATE Jun 30 2009 12:00AM
MONTHENDDAY 4
YEARENDMONTH 12
MONTHENDDATE Jul 31 2009 12:00AM
YEARENDDATE Dec 31 2009 12:00AM
NEXTBRANPRCDATE Aug 03 2009 12:00AM
PREVPREVBRANPRCDATE Jul 29 2009 12:00AM
NEXTMONTHENDDATE t
PREVYEARENDDATE
NEXTYEARENDDATE

The results are shown as the above.
The actual screen outputs are shown below:

opxnyt@opxzone1d:/opt/opxnyt>fisql -S FIOPICSSQLDV1 -U OPXPNYD -n -s\|
Password:
SELECT * FROM BRPS WHERE BR='00'
go
BR|BRSTATUS
|BRPROCDATE|PREVBRPROC|LSTMNTDTE|PRVMENDDTE|BRANPRCDATE|PREVBRANPRCDATE|PREVMNTHENDDATE|MONTHENDDAY|YEARENDMONTH|MONTHENDDATE|YEARENDDATE|NEXTBRANPRCDATE|PREVPREVBRANPRCDATE|NEXTMONTHENDDATE|PREVYEARENDDATE|NEXTYEARENDDATE
--|--------------------|----------|----------|---------|----------|-----------|---------------|---------------|-----------|------------|------------|-----------|---------------|-------------------|----------------|---------------|---------------
00|ONLINE |40025 |40024 |Jul 31 2009 01:51AM|39994
|Jul 31 2009 12:00AM|Jul 30 2009 12:00AM|Jun 30 2009 12:00AM|4 |12
|Jul 31 2009 12:00AM|Dec 31 2009 12:00AM|Aug 03 2009 12:00AM|Jul 29
2009 12:00AM| t

(1 rows affected)
quit




A workaround for this issue seems to be to use a longer column name (can be
padded with some blank spaces):

opxnyt@opxzone1d:/opt/opxnyt>fisql -n -S FIOPICSSQLDV1 -U OPXPNYD -s \| -i
./testsql -P ******
BR|BRSTATUS
|BRPROCDATE|PREVBRPROC|LSTMNTDTE1234567890|PRVMENDDTE|BRANPRCDATE
|PREVBRANPRCDATE
|PREVMNTHENDDATE1234|MONTHENDDAY|YEARENDMONTH|MONTHENDDATE1234567|YEARENDDATE12345678|NEXTBRANPRCDATE1234|PREVPREVBRANPRCDATE|NEXTMONTHENDDATE123|PREVYEARENDDATE1234|NEXTYEARENDDATE1234
--|--------------------|----------|----------|-------------------|----------|-------------------|-------------------|-------------------|-----------|------------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------
00|ONLINE |40025 |40024 |Jul 31 2009 01:51AM|39994
|Jul 31 2009 12:00AM|Jul 30 2009 12:00AM|Jun 30 2009 12:00AM|4 |12
|Jul 31 2009 12:00AM|Dec 31 2009 12:00AM|Aug 03 2009 12:00AM|Jul 29
2009 12:00AM|Aug 31 2009 12:00AM|Dec 31 2008 12:00AM|Dec 31 2010 12:00AM

(1 rows affected)


opxnyt@opxzone1d:/opt/opxnyt>cat testsql
select
BR BR,
BRSTATUS BRSTATUS,
BRPROCDATE BRPROCDATE,
PREVBRPROC PREVBRPROC,
LSTMNTDTE LSTMNTDTE1234567890,
PRVMENDDTE PRVMENDDTE,
--BRANPRCDATE BRANPRCDATE12345678,
BRANPRCDATE 'BRANPRCDATE ',
--PREVBRANPRCDATE PREVBRANPRCDATE1234,
PREVBRANPRCDATE 'PREVBRANPRCDATE ',
PREVMNTHENDDATE PREVMNTHENDDATE1234,
MONTHENDDAY MONTHENDDAY,
YEARENDMONTH YEARENDMONTH,
MONTHENDDATE MONTHENDDATE1234567,
YEARENDDATE YEARENDDATE12345678,
NEXTBRANPRCDATE NEXTBRANPRCDATE1234,
PREVPREVBRANPRCDATE PREVPREVBRANPRCDATE,
NEXTMONTHENDDATE NEXTMONTHENDDATE123,
PREVYEARENDDATE PREVYEARENDDATE1234,
NEXTYEARENDDATE NEXTYEARENDDATE1234

FROM BRPS WHERE BR='00'
go






Archive powered by MHonArc 2.6.24.

Top of Page