Re: ntext getting truncated
- From: "Tibor Karaszi" <tibor_please.no.email_karaszi@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 May 2009 20:42:36 +0200
Try to change the sort order so we can see whether there exist any rows with long text in the database (or if this is a display issue with the tool you use):
ORDER BY ntextlength DESC
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Jack" <Jack@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:9D66296D-D06F-4B53-9A6F-B1182AB8CBD8@xxxxxxxxxxxxxxxx
OK Russell and Tibor
I applied the query as follows:
SELECT TOP 100 * FROM (
select count(*) howmany, datalength(problem) ntextlength
from tblActionRequest
group by datalength(problem) ) AS sizes
order by howmany desc
231 NULL
99 78
94 124
91 98
88 130
88 76
86 94
85 114
84 64
83 90
82 100
82 70
81 120
79 80
78 68
76 162
76 66
76 56
74 84
74 96
73 92
73 116
72 132
71 74
70 126
68 128
67 134
66 72
66 112
64 154
64 82
64 174
64 104
62 122
62 58
62 88
61 144
61 140
61 110
60 106
59 164
59 86
58 146
58 108
58 152
56 160
56 118
56 102
55 138
55 54
54 62
54 176
54 158
54 34
53 156
52 178
52 186
51 148
50 142
50 194
49 60
49 172
48 136
48 166
48 190
48 180
47 200
46 170
45 206
45 150
45 182
44 214
44 210
43 234
41 184
41 224
40 192
40 168
40 202
39 22
39 204
39 196
38 52
38 282
37 198
37 44
36 212
36 220
35 208
35 188
35 266
34 250
33 222
33 48
31 46
31 264
31 244
30 242
30 218
30 228
Do you have any other clue why trucation is taking place and what is the
remedy on this.
"Tibor Karaszi" wrote:
> Thanks Tom and Russell for the help. Acually I am seeing in the
> table that
> data is truncated. I am going to the table and going to the row > and
> copying
> the contents of the field corresponding field and pasting in
> notepad.
That doesn't mean it is truncated inside the database or as seen from
SQL Server's perspective. You are still looking at the data using some
application (and you don't say what app that is, possibly Management
Studio), which very well can limit the length it show. Did you run the
query that Russell posted?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Jack" <Jack@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:538E12F6-3AD2-41D5-AF04-DDB187B29EA1@xxxxxxxxxxxxxxxx
> Thanks Tom and Russell for the help. Acually I am seeing in the
> table that
> data is truncated. I am going to the table and going to the row > and
> copying
> the contents of the field corresponding field and pasting in
> notepad. This
> shows data is truncated. Thus the query shows truncated data as > the
> source is
> truncated. Do you have any further thoughts. Thanks.
>
> "Russell Fields" wrote:
>
>> Jack,
>>
>> How are you seeing that the data has been truncated? If you are
>> seeing the
>> truncated results in your Access application, then they are
>> certainly being
>> truncated and Tom's advice is good for you.
>>
>> If you are seeing the truncated results in SQL Server Management
>> Studio, or
>> in Query Analyzer, you may be suffering from the limits of those
>> tools. In
>> a SQL Server Management Studio query window (for example) select
>> the mnu
>> path Tools \ Options, then in the form select Query Results and
>> either
>> Results to Grid or Results to Text to see the maximum number of
>> characters
>> setting.
>>
>> To check for how long your ntexts are being, you could see the
>> distribution
>> of lengths by a query, such as:
>>
>> SELECT TOP 100 * FROM (
>> select count(*) howmany, datalength(ntextcol) ntextlength
>> from yourtable
>> group by datalength(ntextcol) ) AS sizes
>> order by howmany desc
>>
>> RLF
>>
>>
>>
>> "Jack" <Jack@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:9006ECEA-FB6A-431E-8D2C-06198976553E@xxxxxxxxxxxxxxxx
>> > Hi I have an access application with linked table to sql >> > server.
>> > One of
>> > the
>> > linked table in access is memo field while the corresponding >> > sql
>> > server
>> > field
>> > is ntext. From the front end of the application one can add
>> > rather big
>> > description of problem in the memo field. However in the
>> > corresponding sql
>> > server field(ntext) part of the problem descriptioin is >> > getting
>> > truncated.
>> > I
>> > am not sure why. The form fields are directly linked to the
>> > linked sql
>> > server
>> > table.
>> >
>> > I appreciate any help for resolution of this issue.
>> > Thanks.
>>
>>
.
- References:
- ntext getting truncated
- From: Jack
- Re: ntext getting truncated
- From: Russell Fields
- Re: ntext getting truncated
- From: Jack
- Re: ntext getting truncated
- From: Tibor Karaszi
- Re: ntext getting truncated
- From: Jack
- ntext getting truncated
- Prev by Date: Re: Question on SMO and DMO
- Next by Date: Re: JOIN v. Subquery Speed
- Previous by thread: Re: ntext getting truncated
- Next by thread: Re: ntext getting truncated
- Index(es):
Relevant Pages
|