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 !
[quoted text, click to view] >-----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
>>
>>
>
>.
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
[quoted text, click to view] 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
>
>
Yanick,
Have you checked the Query Analyzer setting I mentioned? It does not
apply to PRINT, so what you see in Query Analyzer may just be because
you have too small a value for that setting. As for WinDev, perhaps it
has a similar setting?
SK
[quoted text, click to view] Yanick Charland wrote:
>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
>>>
>>>
>>>
>>>
>>.
>>
>>
>>
Don't see what you're looking for? Try a search.