dbTalk Databases Forums  

Text Data Type with sp_tableoption

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Text Data Type with sp_tableoption in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Preet Kanwaljit Singh
 
Posts: n/a

Default Text Data Type with sp_tableoption - 01-10-2004 , 02:26 PM






I am trying to insert large text data into a field with ntext data type definition, i cannot insert more than 255 characters even after using the sp_tableoption table, 'text in row', 7000 , kindly suggest how it is possible to store complete html of yahoo.com first page into a field.

i am using sql server 2000 enterprise edition

my mail id is preetsinghasr (AT) hotmail (DOT) com

kindly provide a solution to my immediate problem, it has been haunting me for a long time now. have turned over all the net, before finally landing here on a friends advice.


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-11-2004 , 06:09 AM






What makes you think you have not inserted > 255 characters into the field.
Is it because you have asked to view the contents in QA ?

If yes then do this

Tools | Options | Results

You are looking for the "Max Characters per column"



--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Preet Kanwaljit Singh" <preetsinghasr (AT) hotmail (DOT) com> wrote

Quote:
I am trying to insert large text data into a field with ntext data type
definition, i cannot insert more than 255 characters even after using the
sp_tableoption table, 'text in row', 7000 , kindly suggest how it is
possible to store complete html of yahoo.com first page into a field.
Quote:
i am using sql server 2000 enterprise edition

my mail id is preetsinghasr (AT) hotmail (DOT) com

kindly provide a solution to my immediate problem, it has been haunting me
for a long time now. have turned over all the net, before finally landing
here on a friends advice.
Quote:



Reply With Quote
  #3  
Old   
Preet Kanwaljit Singh Shergill
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-11-2004 , 08:34 PM




sir,

i have been trying to insert > 255 character using the insert into
statement,

insert into table (field) values ('3000 random chars')

it does not seem to work as the output is limited to 255 characters,
kindly advice on means as i think i am going wrong somewhere, and am
unable to get along.

preet


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-12-2004 , 12:05 AM



In my last reply I explained the probable answer

Are you looking through Query Analyser?

Yes

Tools | Options | Results |

Now change the value for "Maximum Characters Per Column"



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Preet Kanwaljit Singh Shergill" <preetsinghasr (AT) hotmail (DOT) com> wrote in
message news:%23VDFZSL2DHA.2620 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
sir,

i have been trying to insert > 255 character using the insert into
statement,

insert into table (field) values ('3000 random chars')

it does not seem to work as the output is limited to 255 characters,
kindly advice on means as i think i am going wrong somewhere, and am
unable to get along.

preet


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-12-2004 , 03:45 PM



In message <enTYnGN2DHA.2544 (AT) TK2MSFTNGP10 (DOT) phx.gbl>, Allan Mitchell
<allan (AT) no-spam (DOT) sqldts.com> writes
Quote:
In my last reply I explained the probable answer

Are you looking through Query Analyser?

Yes

Tools | Options | Results |

Now change the value for "Maximum Characters Per Column"



...and to prove that it is just the QA setting Allan describes try
querying the column length with teh LEN function, e.g.

SELECT LEN(name) FROM sysobjects
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #6  
Old   
Preet Kanwaljit Singh Shergill
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-13-2004 , 12:12 PM



sir,

thanks for the help, it has definitely solved my problem, i have one
more query, by default the date entered in the field is 1900 where do i
change this from, so that the smalldatetime takes current date and time.

preet



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #7  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-13-2004 , 12:45 PM



The SQL Server datatype Datetime always holds Date and Time information.

If you fail to enter a Date then it stores 1-1-1900. If you fail to enter a
time then it holds midnight.

If you want to have a default of "Now" entered into a Datetime/smalldatetime
field then you can use

DEFAULT GETDATE() in the table definition.

You can also insert this value when you are doing your INSERT

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Preet Kanwaljit Singh Shergill" <preetsinghasr (AT) hotmail (DOT) com> wrote in
message news:%23DH%23EDg2DHA.2224 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
sir,

thanks for the help, it has definitely solved my problem, i have one
more query, by default the date entered in the field is 1900 where do i
change this from, so that the smalldatetime takes current date and time.

preet



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #8  
Old   
Preet Kanwaljit Singh Shergill
 
Posts: n/a

Default Re: Text Data Type with sp_tableoption - 01-13-2004 , 01:57 PM




thanks allan, for the help given.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.