Re: Select instruction not returning entire column (explicit truncate ???)

From: Yanick Charland (YanickCharland_at_hotmail.com)
Date: 03/22/04


Date: Mon, 22 Mar 2004 08:08:15 -0800

Hi Steve,

I first noticed that behavior while using an ADO recordset
in my dev. tool (WinDev). I tried to isolate the "bug" and
tested my select statement with Query Analyser (gris off
AND grids on)... same response from SQL server. So I
looked into my table with Enterprise Manager and...
surprise... I can see all my data.

More surprising : I tested this script into Query
Analyser :

Select Top 1 COL1 from TABLE1 -- returns truncated data
declare @Test varchar(1500)
Select Top 1 @Test = COL1 from TABLE1
Print @Test -- Print non truncated data

How can that be ?

Thanks for you answer !

>-----Original Message-----
>Yanick,
>
> What tool are you using? Perhaps you are using Query
Analyzer with
>grid output, and the strings contain non-printing
characters like
>char(0) or others below char(32)? See if you see
everything after
>converting the strings to varbinary(2000), and try text
output after
>setting Tools|Options|Results|Maximum Characters Per
Column to a large
>value. If there are non-printing characters in the
strings, there is no
>guarantee with any tool that you will see the contents
correctly.
>
>Steve Kass
>Drew University
>
>Yanick Charland wrote:
>
>>Good day,
>>
>>[SQL Server 7.0, SP4]
>>
>>I have a table wich contains only one column [varchar
>>(1500)] filled with some texts (different length,
ranging
>>from 150 chars up to 1200s). When I execute "Select *
from
>>Table1", I only get parts of my texts; the returned
>>strings are truncated, but not all at the same size...
>>
>>What am I missing here ? When I open my table in
>>Entreprise manager, I see my texts the way they should
>>be... complete !
>>
>>Thanks for your help... I badly need it !
>>
>>Yanick Charland
>>
>>
>
>.
>



Relevant Pages

  • Psycopg and queries with UTF-8 data
    ... I have a query that inserts data originating from an utf-8 encoded XML ... it contains utf-8 encoded characters... ... strings. ...
    (comp.lang.python)
  • Re: Select instruction not returning entire column (explicit truncate ???)
    ... Have you checked the Query Analyzer setting I mentioned? ... >characters like ... >>converting the strings to varbinary, ...
    (microsoft.public.sqlserver.mseq)
  • Re: Why R6RS is controversial
    ... the semantics of the language, ... behavior of grapheme-cluster characters under most linguistic ... as the strings grow longer. ... Normalization is hideously complicated, and may require many ...
    (comp.lang.scheme)
  • Re: Unicode LISP??
    ... I'm not experienced with Common Lisp library, ... terms of strings rather than characters. ... have their representation upgraded if they are updated in place. ...
    (comp.lang.lisp)
  • Re: not quite 1252
    ... The kill_gremlins function is intended to fix Unicode strings that have been obtained by decoding 8-bit strings using 'latin1' instead of 'cp1252'. ... In fact it wasn't, it was UTF-8 like Sergei wrote, but it was easy to convert it to cp1252, no problem. ... characters to documents marked up as ISO 8859-1 or other encodings. ...
    (comp.lang.python)