dbTalk Databases Forums  

pulling ntext values sql server 2005

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss pulling ntext values sql server 2005 in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
phil2phil
 
Posts: n/a

Default pulling ntext values sql server 2005 - 03-12-2007 , 09:50 AM






hi,
i have a column of type ntext in the db, we're using that to allow
users to store essays they can enter. problem is when i'm running a
select on the ntext column, data seems to be getting cut off, isn't
ntext suppose to hold a lot of data, we wanted to allow them in a min
of 1500 chars, while everytime i do a
select len(max (convert(nvarchar(2000), essaytext)))

just to see the max we one had it's always 200.

Thanks.


Reply With Quote
  #2  
Old   
Greg D. Moore \(Strider\)
 
Posts: n/a

Default Re: pulling ntext values sql server 2005 - 03-12-2007 , 10:11 AM








"phil2phil" <philtwophil (AT) yahoo (DOT) com> wrote

Quote:
hi,
i have a column of type ntext in the db, we're using that to allow
users to store essays they can enter. problem is when i'm running a
select on the ntext column, data seems to be getting cut off, isn't
ntext suppose to hold a lot of data, we wanted to allow them in a min
of 1500 chars, while everytime i do a
select len(max (convert(nvarchar(2000), essaytext)))

just to see the max we one had it's always 200.

Thanks.

What tool are you using for this? If it's QA, you can adjust what it returns
via a setting.

--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com




Reply With Quote
  #3  
Old   
phil2phil
 
Posts: n/a

Default Re: pulling ntext values sql server 2005 - 03-12-2007 , 10:26 AM



Hi,
I've tried both Sql sever 2000 QA and Sql server 2005 Management
Studio. For QA i set the Results Max chars to 8192 and in Management
studio i set the max chars per column for Text Retults to 8192 and for
Grid to Non XML 65535, but it's still not returning the full, and each
max length is always 200.

On Mar 12, 12:11 pm, "Greg D. Moore \(Strider\)"
<mooregr_deletet... (AT) greenms (DOT) com> wrote:
Quote:
"phil2phil" <philtwop... (AT) yahoo (DOT) com> wrote in message

news:1173714656.510142.22770 (AT) v33g2000cwv (DOT) googlegroups.com...

hi,
i have a column of type ntext in the db, we're using that to allow
users to store essays they can enter. problem is when i'm running a
select on the ntext column, data seems to be getting cut off, isn't
ntext suppose to hold a lot of data, we wanted to allow them in a min
of 1500 chars, while everytime i do a
select len(max (convert(nvarchar(2000), essaytext)))

just to see the max we one had it's always 200.

Thanks.

What tool are you using for this? If it's QA, you can adjust what it returns
via a setting.

--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com



Reply With Quote
  #4  
Old   
phil2phil
 
Posts: n/a

Default Re: pulling ntext values sql server 2005 - 03-12-2007 , 10:40 AM



I think i found it, the stored proc doing the actual insert into the
table, was set to @ESSAYTEXT varchar(200) for that column, we decided
to restrict it to 2000 chars, so changing it to @ESSAYTEXT
varchar(2000), hopefully that's fix it, the varchar(200) explains the
max(len issue as well.

On Mar 12, 12:26 pm, "phil2phil" <philtwop... (AT) yahoo (DOT) com> wrote:
Quote:
Hi,
I've tried both Sql sever 2000 QA and Sql server 2005 Management
Studio. For QA i set the Results Max chars to 8192 and in Management
studio i set the max chars per column for Text Retults to 8192 and for
Grid to Non XML 65535, but it's still not returning the full, and each
max length is always 200.

On Mar 12, 12:11 pm, "Greg D. Moore \(Strider\)"

mooregr_deletet... (AT) greenms (DOT) com> wrote:
"phil2phil" <philtwop... (AT) yahoo (DOT) com> wrote in message

news:1173714656.510142.22770 (AT) v33g2000cwv (DOT) googlegroups.com...

hi,
i have a column of type ntext in the db, we're using that to allow
users to store essays they can enter. problem is when i'm running a
select on the ntext column, data seems to be getting cut off, isn't
ntext suppose to hold a lot of data, we wanted to allow them in a min
of 1500 chars, while everytime i do a
select len(max (convert(nvarchar(2000), essaytext)))

just to see the max we one had it's always 200.

Thanks.

What tool are you using for this? If it's QA, you can adjust what it returns
via a setting.

--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com



Reply With Quote
  #5  
Old   
Greg D. Moore \(Strider\)
 
Posts: n/a

Default Re: pulling ntext values sql server 2005 - 03-12-2007 , 11:51 AM





"phil2phil" <philtwophil (AT) yahoo (DOT) com> wrote

Quote:
I think i found it, the stored proc doing the actual insert into the
table, was set to @ESSAYTEXT varchar(200) for that column, we decided
to restrict it to 2000 chars, so changing it to @ESSAYTEXT
varchar(2000), hopefully that's fix it, the varchar(200) explains the
max(len issue as well.

Yeah.. if you're only inserting 200.. ;-)

(note that text fields sometimes are better handled with readtext/writetext.

But if you're moving to SQL 2005 any time I'd highly recommend varchar(max)



--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.