Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





ADO.NET SQL-Server Text Data Type


Hi, dear





I need to get the full text of a text datatype collumn of a sql-server table.


I tried the example of this link (http://www.kbalertz.com/Feedback_317034.aspx) and change getbytes to getchars and I didn't get the full


text. What's wrong? How can I get the full text?


Thank you very much.





Obede


Brazil




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
TEXT Data Type In SQL Server
Sorry if this is a dumb question.

I have a SQL Server TEXT Data Type field which stores a long description.
However when I update it from C# (ASP.net) through a textbox, it seems to cut off a part of the data if the number of characters is a big size (+- more than 577 characters).

I pass the data from then textbox to a string, but as soon as I run the Create/Update stored procedure that gets passed the string field, it seems to chop off the string.

What am I doing wrong?
Should one rather use a SQL Server string field for descriptions (+-1000 characters long) or should one use the TEXT field for this purpose?

Which one's performance is better?

View Replies !   View Related
SQL Server 'text' Data Type. Why Is Length = 16??
i need to store quite along description in the database, which in anyother database i would choose the data type 'text', however, can someone tell me why the length is set to just 16 in sql server..... i have seen a text field with far greater than 16 chars, set at length 16, so what does this length of 16 mean?????
also what is the max length of the text field?

thanks

View Replies !   View Related
Text Type Data Transfer Bw 2 Sql Server
We use SQLServer 6.5 as our server part. We had to
migrate our sqlserver from one NT machine A to another NT machine B.
We used the Object/data transfer to transfer from A to B after
registering both the servers on server B.
One table which i have transferred has three columns having
Text as the datatype. The transfer was successful.
In server B (to which the database was transferred)
On running DBCC soon after transfer on that table, the result
is : no errors found.
Now if i add a new entry or start modifying data in that table,
then after a few updates i get the 806 error indicating null pointer
found. I presume that it is due to the text type columns present.
I again run the DBCC check on that table nd i get a whole
set of records whose data has been corrupted.
The same records work perfectly in the server A on that table
without any problems.
I wanted to know whether text type columns have a bearing on the
hardware setting on the machine. Can any one Highlight on this.
I tried BCP, but it taken a hell lot of time to output the data.
Is BCP the only safe choice?.
Please email ur suggestions to psbhat321@yahoo.com
Thanks

View Replies !   View Related
Converting Numeric Data Type To Text Data Type
Hi,I would like to convert a dollar amount ($1,500) to represent Fifteenhundred dollars and 00/100 cents only for SQL reporting purposes. Isthis possible and can I incorporate the statement into an existingleft outer join query.Thanks in advance,Gavin

View Replies !   View Related
Convert Text Data Type To Smalldatetime Data Type
I have a field that is currently stored as the data type nvarchar(10), and all of the data in this field is in the format mm/dd/yyyy or NULL. I want to convert this field to the smalldatetime data type. Is this possible?
I've tried to use cast in the following way, (rsbirthday is the field name, panelists is the table), but to no avail.
 

SELECT rsbirthday CAST(rsbirthday AS smalldatetime)

FROM panelists
 

the error returned is "incorrect syntax near 'rsbirthday'.
 
I'm rather new to all things SQL, so I only have the vaguest idea of what I'm actually doing.
 
Thanks for the help!

View Replies !   View Related
Truncated Text In Text Data Type
We have a text field which is being written to from a java app through JDBC-ODBC. But the data seems to be trucated in the DB. How do we store all the data in this field (the text being stored can be quite large) without it being truncated?

View Replies !   View Related
Text Is Getting Cut After 1.4k Letters In Text Data Type
Hello all,
started working on a website in ASP that use mssql, i am trying to store large ammount of text, for now its just 10kk letters, the data type is set to text in the mssql db, but when i read it back from the db, i only get 7.7k letters, i know its not an ASP problem cause i print the var holding the content before storing it in the db.

my question is, is there a way to change the text length limit in mssql, or use another data type?

Thanks,
Gilad Darshan


EDIT: forgot its saving the html source with the style and not only the words. fixed to the right amount of letters

View Replies !   View Related
How To Convert To Regular Text, Data Stored In Image Data Type Field ????
Hi,This is driving me nuts, I have a table that stores notes regarding anoperation in an IMAGE data type field in MS SQL Server 2000.I can read and write no problem using Access using the StrConv function andI can Update the field correctly in T-SQL using:DECLARE @ptrval varbinary(16)SELECT @ptrval = TEXTPTR(BITS_data)FROM mytable_BINARY WHERE ID = 'RB215'WRITETEXT OPERATION_BINARY.BITS @ptrval 'My notes for this operation'However, I just can not seem to be able to convert back to text theinformation once it is stored using T-SQL.My selects keep returning bin data.How to do this! Thanks for your help.SD

View Replies !   View Related
Move Text Data (not A File) Into An Image Data Type
 

The ERP manufacturer used an image data type to store large text data fields. I am trying to move these data types from one database to another database using either Sql Queries or MS Access. I can cast them as an 8000 char varchar to read them directly but have no luck importing into these image data fields.
 
Access and Crystal are not able to read these fields directly.
 
Any suggestions? Most information about these fields has to do with loading files but I am just moving data.
 
Thanks,
 
Ray
 

View Replies !   View Related
Text Data Type
This is a newbie question.
How many character does a text data type of MSSQL can contain ?
Thanks a lot.

View Replies !   View Related
Text Data Type
visual studio 2005 what is the differences between text, varchar and nvarchar data types in ms sql server? when and when not to use them?

View Replies !   View Related
Text Data Type
Hi All,
In the SQL Server documentation, it is said that, the text data type will contain upto 2GB size. I assumed it will save upto 2GB. But what happened is, it saves only 255 characters all others were truncated. Is there anything wrong with me? Or the wrong is with the SQL Server?

Thanks,
Amjath

View Replies !   View Related
Text Data Type
I'm having a bit of a problem with this data type. It is supposed to be able to store about 2,147,483,647 characters, but when I enter more than about 1,834 characters no more charaters can be stored.

Has anyone experienced this and knows how to allow up to the 2,147,483,647 characters. Is it anything to do with another SQL Server setting or variable that needs to be changed

Thank you in advance for helping on this.

Regards

Steve Fouracre

Steve Fouracre

View Replies !   View Related
Inserting Data Into Text Or Image Data Type
Hi all,
Pls tell me how to insert large data into text or image data type of MS SQL Server using Java.

Waiting for reply.........

View Replies !   View Related
Data Type Varchar And Text
I encounter this particular error.
Exception Details: System.Data.SqlClient.SqlException: The data types varchar and text are incompatible in the equal to operator.
Line 21:             Dim reader As SqlDataReader = command.ExecuteReader() 
This is the first time I'm trying out with MS SQL so I'm abit lost. I hope my code is correct and I've did a little search. I did not set "Text" in my database, I use int and varchar. Here's the affected part of my code and the database. Dim password As String = ""
Dim querystring As String = "SELECT Password FROM Member WHERE Username = @username"

'Dim conn as SqlConnection
Using conn As New SqlConnection(ConfigurationManager.ConnectionStrings("mainconnect").ConnectionString)
Dim command As New SqlCommand(querystring, conn)
command.Parameters.Add("@username", SqlDbType.Text)
command.Parameters("@username").Value = txtLogin.Text
conn.Open()

Dim reader As SqlDataReader = command.ExecuteReader()
While reader.Read()
password = reader("Password").ToString()
End While

reader.Close()

End Using
 
My database:
User_ID int(4)
Username varchar(50)
Password varchar(255)
Email varchar(50)
 
Any ideas?

View Replies !   View Related
Why Does Data Type Text Allow Max. 64 Characters?
hi all
does anybody know why the fields of my db with the type "text" can store max. 64 characters? i thought fields of the type "text" could save unlimited characters. is it any wrong setting?i'm using visual web developer with sql server express

View Replies !   View Related
Using Group By For Text Data Type
Hi,I have a problem on an old app. This application is a Help Desk, any Computer related problem (Motherboard Burn Out, Software Crash, dll) on my company will be recorded using this Help Desk application.One month ago, some programmer found a bug in this program lead to many duplicate data on database. But too late, This program has entered production stage and used for more than 2 years. This bug only happen at some condition so I found out after 2 years running (when my boss reported there are some duplicate data on "helpDesk" table).The bug is solved but helpDesk table need some "cleaning" operation. Here is structure of that table :helpDesk Table- id (primary key, integer auto increment)- reported_by (varchar 200)- problem_title (varchar 200)- problem_description (text)- date_summited (datetime)well usualy if I want to find some duplicate data I wil type :SELECT     MAX(uid) AS uid, reported_by, problem_title, COUNT(uid) AS total_duplicateFROM         problemsGROUP BY problem_title, problem_description,uidHAVING      (COUNT(uid) > 1)But that query will not work because problem_description data type is "text" which not support "group by" statement.Any other Idea how to locate and cleaning up this duplicate data?thanks

View Replies !   View Related
Text Data Type And Performance
I was wondering if someone could clear this up for me...
I have a table that will be used to store information about products that I will be selling on a new website. I would like to store each product in a table which will include a description of around 1000 words. I was deliberating over whether to store this chunk of text in a column with the data type set as 'text', or to store the text in a seperate txt file on the server. The search facility on the site will not be required to query this text so which would offer the best in terms of performance?

View Replies !   View Related
Text Data Type In Trigger
Hi,

I am using following query to get insereted records from a table, which is containing a column, having text datatype.

'SELECT * INTO #TEMP FROM INSERTED'

Then obviously it gives error.

Wat if i want to get all the columns from inserted table excluding the text datatype column, without giving the column names.

Thanks & Regards.
Shabber.

View Replies !   View Related
Problem With Using A 'text' Data Type.
I am using a 'text' data type in a table and am having trouble adding data to it. I'm using an MS Access ADP project front end for my forms. I want to copy and paste from a text editor such as NotePad to a 'text' data type field in a form. There appears to be a limit that the field will accept which is much below the 2GB size that is allowed for the field. I get the following error message: "The text is too long to be edited." Once I get this error I can add characters from the keyboard but eventually the field will not accept any more characters. Typing or pasting does nothing. I can delete. So I've hit a limit but I'm not sure if it is in Access or SQL Server.

Any help would be appreciated.

Dennis Geasan

View Replies !   View Related
BCP Import For Text Data Type
Hi,
Everyone
While importing data with BCP utility from flat file. What parameter or switch I do have to specify for Text data type.

Thanks
Nirmal

View Replies !   View Related
Trigger And Text Data Type
Hi All,
I have the code below on Sql 2k table with the column Descriptivetext defined as
Text Data Type. The table has Path and Page as the PK
I need to set a trigger to update Desciptivetext in other rows with the same path
when a one of them chnages.
Whenever I run the code, no row is updated

CREATE TABLE [dbo].[AB] (
[PATH] [varchar] (255) NOT NULL PRIMARY KEY CLUSTERED ,
[PAGE] [varchar] (60) NOT NULL PRIMARY KEY CLUSTERED ,
[DESCRIPTIVETEXT] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TRIGGER [Update_Staging_Test] ON [dbo].[AB]
INSTEAD OF UPDATE
AS

Declare @TextPointer as Varbinary (16), @NewTextPointer as Varbinary (16), @Path
varchar(255), @Page as varchar(60), @DescriptiveText as varchar(7000)
If Update(DescriptiveText)
--Get the Path of the record from Inserted
Select @Page = Page, @Path = Path , @DescriptiveText = Cast(DescriptiveText as
Varchar(7000))
from Inserted


UPDATEAB
SETDescriptiveText = Cast (@DescriptiveText as Text)
WHEREPath = @Path




Rgds
GERI

View Replies !   View Related
Data Type For MP3's And Long Text
Hello,
I would like to know as to what data type is the best if I want to store MP3's and large amount of text in a SQL server.
Please let me know about the data type for both the tasks.
The table for MP3 is different than the table for large text (eg . saving somebody's resume)
Please do let me know.

Thank you,

John

View Replies !   View Related
DB Mail + Text Data Type
So, I'm trying to send newsletters using the new DB Mail with SQL 2005. The newsletter content is HTML and has the ability to be larger than the varchar data-type can handle AND the text data-type is not available locally. No sweat ... I'll just create a dynamic EXEC - SELECT statement and feed the content directly to DB Mail out of the table. So far, I've tried ...

EXEC msdb.dbo.sp_send_dbmail @body=SELECT content FROM tablename

EXEC msdb.dbo.sp_send_dbmail SELECT @body=content FROM tablename

NO DICE! ACK!

I know this must be possible, but I'm getting no where. Any ideas?

Thanks!

View Replies !   View Related
Text Data Type Problem
I have a table named 'Documents' with a field named 'DocumentData' which is of the datatype Text.
 
I am using the following statements in a stored procedure which on execution gives errors:
 

DECLARE @DocData VARCHAR(100)

DECLARE @OrderID INT

IF ISNULL(@DocData, '') <> ''

BEGIN



IF EXISTS( SELECT DocumentData from Documents where OrderID=@OrderID and DocumentData = @DocData)

RaisError ('Document ignored.', 16, 1)




 

The errors that i am getting are the following :

Msg 279, Level 16, State 3, Procedure SPDocs_LoadData, Line 41
The text, ntext, and image data types are invalid in this subquery or aggregate expression.
Msg 306, Level 16, State 1, Procedure SPDocs_LoadData, Line 41
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

Can anyone tell me how to rectify this? Basically i am trying to find out whether @DocData passed in the stored procedure matches the value in the table.
 
Thanks. 
 

View Replies !   View Related
Inserting The Data Into Text Data Type
Hi everybody,

In our datbase we have a table with text data type.Help me if anybody knows how to insert text data into text data type of sql server.

i am able to modify and retrive but i am not able to insert text. please if u have idea, please give me reply asap.

Thanks,
Giri

View Replies !   View Related
Using Text Data Type In Dynamic Sql Sproc
hi allthis is my first post to this group, so pls bear with me while i tryto make some sense.i am trying to create a sproc which uses dynamic sql to target aparticuar table eg. '[dbo].[' + @tableID + '_articles']' and performsome actions.i am using @tableID [int] as a passes parameter for the sproc.everything seems to work fine until i try and manipulate a parameterwhich is of text data type.the error occurs when i try to build the dynamic sql string and appendthe text type variable.eg.CREATE PROCEDURE [procArticlesInsert](@siteID [int],@strShortTitle [varchar](40),@strLongTitle [varchar](60),@strShortContent [text],@strLongContent [text],@intSectionID [int],@intTemplateID [int],@intStatusID [int])ASDECLARE @strSQL varchar (1000)DECLARE @strSiteID varchar (10)SET @strSiteID = CAST(@siteID AS varchar)SET @strSQL = ('INSERT INTO [' + @strSiteID + '_articles] ' +'( [dateEntered], ' +'[shortTitle], ' +'[longTitle], ' +'[shortContent], ' +'[longContent], ' +'[sectionID], ' +'[templateID], ' +'[statusID]) ' +'VALUES ' +'(' + CAST(GETDATE() AS VARCHAR) + ', ' +'''' + @strShortTitle + ''', ' +'''' + @strLongTitle + ''', ' +''''@strShortContent , ' +'@strLongContent , ' +CAST(@intSectionID AS VARCHAR) + ', ' +CAST(@intTemplateID AS VARCHAR) + ', ' +CAST(@intStatusID AS VARCHAR) + ')')GOi could cast the text fields (@strShortContent , @strLongContent) tovarchar, but the restriction of 8000 characters will not go down sonicely.if anyone has any ideas or alternatives to what i am trying toachieve, i would love to hear from you.thanksadrian.

View Replies !   View Related
Breaking Out Data From A Text Field Type
In my database there is a text field type that is used to enter streetaddress. This address could be a few lines long, each line with acarriage return at the end.Is there a way to search for these carriage returns and break out whatis in each line seperately?Thanks.Mike

View Replies !   View Related
SQL Query:TEXT Data Type Operators
If anyone could help me on this i would really appretiate it.

It's basically a stupid problem, that i am really not understanding.

I'm making a query on a table named 'News'
In this table 2 of the fields i have are:
date type DATE
news type TEXT

I am now making a query, and adding a 3 column.
On this 3rd column i want to add a few words to the TEXT variable.
And that's when my problem starts!

If i had 2 char variables, i could do like 'abc' + 'def' and i would have the result 'abcdef'.

But how to add a few lines of text to a TEXT data type variable???
Can't find the solution anywhere. Just a few words on the end of the TEXT variable.

Basically what i will want after that problem is solved is to convert the data to string and add it to the news TEXT variable.... simple as that.... on every line.

This should be simple, except i don't know what are the TEXT data type OPERATORS and FUNCTIONS...

well... i think this is simple now to understand... but in any case I'll be around to explain better anything you need to help me.

Thanks in advance to all!

View Replies !   View Related
DTS - Garbage In Text Data Type Fields
In several tables, from different DTS packages, several text data type fields contain garbage. We are transferring from SQL Server 6.5 SP5 to 7.0 SP2.

View Replies !   View Related
Data Type Text + Transfer Objects
Hi,

I'm running SQL 7 and made a field of the data type text. Now in books online it says that it can contain a vast amount of data, over 10^9 characters or something. I can insert, delete, read everything I want, but ....

when I transfer the table to another database using ''transfer objects'' and all the right options, then only those rows get copied which contain less than 10^6 characters or so (I was not able to explicitely devise the bound).

When I use the option ''copy table'', then everything goes fine. The problem is that I do not want to treat this table anyt different from the others, so..... Also, you loose some information (e.g. about the keys and stuff) when you use this option.

Anyone got a solution / comment ?

Thanks,

Fre

View Replies !   View Related
BCP .CSV Text Import To INTEGER Data Type
Anyone help.

I have a text file to BCP into a table as integer data type.

View Replies !   View Related
Using TEXT Data Type With Carriage Return
Hi,
 
I'm using quite odd combination of technology for my project, I'm using PHP and MSSQL 2000, at one certain page, I want to insert to a table where one of the column is TEXT data type, and I want to get the value from the TEXTAREA at the page, of course, with carriage return captured, I manage to get it done in MySQL, where it automatically store the carriage return keyed in by user at the TEXTAREA, while for MSSQL I no luck in finding solution for this, is there any settings I can set or I need to convert the carriage return keystroke to HTML tag at my PHP?
 
Thanks

View Replies !   View Related
How To Set Up Search On Text Stored In An Image Type Of Data?
I am saving large text document in an image type of column in a SQL Server 2000 table.
How will I set up searching of words/ phrases for data stored in this column?

View Replies !   View Related
In SQL 2000 In TEXT Data Type How Much Long Is The Limit?
Hai Every one
      i am facing a werid problem it is related to storing a long text data in SQL 2000 the text data is some thing like the following
"dshjfsjlksdjakdjlksadjfeidkadflkdsajfieawirfjalkdfjsakdfjaiekdvnmckaumnmmmmmmmmmmmmmmmoadifdjsakdjfauiereoweiiiiiiiiiiiiiiiiiiiiiiiiiiidalfkjdsa,mlfdsdflvmsaldifsdjfskladfakdfjakladkalfkfadkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkadlkfjaidfajfkamcmmmmmmmmmmmmmmmmmmmmmmmmmmmmmiadlmfalierfmaerjeaiaelelllllllllllllllllllll..."
in short it is really long so i opted to go with TEXT data type as it states that it can store more than 8 kb but when i try to insert this data it gives me error stating that Text data type cannot be of length more than 128...........?
What  am i doing wrong........if Text is not the proper datatype to store such a data then can anyone suggest some thing better...............
Thanks in advance
Austin

View Replies !   View Related
Text Data Type From Deleted Table (trigger)
Hi,

I need to prevent modification/update to a field.

So I created a trigger. To take the data from DELETED table then replace the field data.

However, I have problem with one field which data type is text.

MS SQL always return me this error:
Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.

I use the following code to take the data from deleted table

DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(NOTES )
FROM DELETED

I also tried simple Select statement
Select notes from deleted

What code should I use to take the deleted data

Please help.

Thanks in advance

View Replies !   View Related
DTS- Oracle (LOB Data Type) To Sybase(text Datatype)
Hi,
Any one has try data transfer from Oracle to Sybase using DTS, especially text data type. I am concern about performance and how it is going to handle
Blob data type in Oracle & text data type in Sybase.If any one has used extensively Data Transfer of Text data type.

I have done with ODBC driver but never get a chance to do with OLE-DB driver.
If any one has used Ole-db please comment something on that.


Thanks.
Nirmal

View Replies !   View Related
The Text Data Type Cannot Be Selected As DISTINCT Because It Is Not Comparable.
I'm having a problem building a query for an application I'm writing. Basically, there are a bunch of records in a table, and some of them may have the same identifier code. I only want one of each identifier code. The table looks like this:
 
Memo
---------
Msg_Identifier         varchar(60)
Memo_ID               int (pk)
Subject                  varchar(64)
Message                text
Priority                   int
Deleted                  int
 
 
My query:
 
SELECT DISTINCT Msg_Identifier, Memo_ID, Subject, Message, Priority FROM Memo WHERE Deleted = '0'

 
 
When I run this query, I get "The text data type cannot be selected as DISTINCT because it is not comparable."
 
I only want Msg_Identifier to be the distinct field, and it's obviously not set up as text. I've used SELECT DISTINCT in the past but I don't ever recall hitting an issue like this. What's the best way to do it?

View Replies !   View Related
Vertical Partition Of Table With TEXT Data Type
 

Hi
Column with TEXT datatype is not stored in the same data row any way. I am wondering if there is any performance gain to put it in a seperate table. Thanks

View Replies !   View Related
How To Mask Password Text In SQL Field Data Type.
AnupG writes "hi,
the most common feature that any RDBMS provides should be that if we want to store the data in the MSSQL tables then the data should be presented in masked/formatted like for eg.the password text in field should be like "*****". I am using SQL 2000 but i unofrtunately i couldn't find any such feature in defining the data type in SQL server 2000 ...?"

View Replies !   View Related
Problem Using Data Type Text As Output Parameter
Hello,

My datalayer of C# code is invoking a stored procedure that returns a varchar(max) SQL data type. In my ASP.NET code, I have:

SqlCommand myCommand = new SqlCommand("usp_GetTestString", myConnection);
myCommand.Parameters.Add(new SqlParameter("@TestString", SqlDbType.Text));
myCommand.Parameters["@TestString"].Direction = ParameterDirection.Output;
myConnection.Open();
myCommand.ExecuteNonQuery();
return Convert.ToString(myCommand.Parameters["@TestString"].Value);

The query fails to execute and returns an error: String[1]: the Size property has an invalid size of 0. If I change the SqlDbType.Text parameter type to SqlDBType.Varchar, 100 (or any other fixed varchar length), it works but limits the length my unlimited field text. Any suggestions on how I can use db type text or varchar(max)? The field I need to retrieve is string characters of unlimited length and hence the datatype varchar(max).

View Replies !   View Related
How? : Using A Varchar, Text Data Type Variable As Valid Column Name.
Cannot use dynamic sql in current context. So need some help regarding this.I am developing a stored procedure to update a table. Sending Column names as parameters, but not able to use them as given below.INSERT INTO Books (@Column1, @Column2) values.. Any way to execute without using dynamic sql?..Thanx.   

View Replies !   View Related
Alternative For LEFT() And CHARINDEX() That Works With Text Data Type
I have a stored procedure that receives a list of ids, to get the emails of each of those ids. The problem that I'm having is that I'm using a char data type that is max length is 8000, but the contact lists are getting bigger and soon they might reach the variable max length. The contact list that I receive will look something like this "1234,67523,67875,789687,", I'm using "," as a separator. Right now what I do is this
@array_value = LEFT(@ContactList, @separator_position - 1)
 
The LEFT function doesn't work with data types text and ntext. But I'm in need of a string data type with a max length bigger than 8000. So I will apreciate if anyone knows of another function that does the same or similar and works with text data type, or any other ideas will be welcome.
 
Thanks,
 Erick

View Replies !   View Related
Output Parameter With Text Data Type In Stored Procedure
How can I make a stored procedure which has a output parameter withtext data type? My procedure is:CREATE PROCEDURE try@outPrm text OutputASselect @outPrm =(select field1 from databaseName Wherefield2='12345')GOHere field1 is text data type.Thanks

View Replies !   View Related
Carriage Return Inside A Field Of Text Data Type?
how can i insert a carriage return when i update the field?

say i want to put the following inside a field:
firstline
secondline

how can i update/insert a column to have a return carriage inside it?
UPDATE table SET column = 'firstline secondline'

the reason i want this is because when using a program (Solomon, by microsoft, purchasing software) to grab a field out of the database and when it displays that field in the programs textbox, i want it to be displayed on two separate lines

i tried doing
UPDATE table SET column = 'firstline' + char(13) 'secondline'

but when in the solomon program, it displays an ascii character between firstline and secondline like: firstline||secondline

thanks

View Replies !   View Related
How To Return FTS Results From Varchar(MAX) Or Text Data Type Column?
I am unable to get FTS working where the column to be searched is type varchar(MAX) or Text. I can get this to work if my column to be indexed is some statically assigned array size such as varchar(1000).
 
For instance this works, and will return all applicable results.

CREATE TABLE [dbo].[TestHtml](

[ID] [int] IDENTITY(1,1) NOT NULL,

[PageText] [varchar](1000) NOT NULL,

CONSTRAINT [PK_TestHtml] PRIMARY KEY CLUSTERED
 

SELECT * FROM TestHTML WHERE Contains(PageText, @searchterm);
 
And this does not.  It returns zero results what so ever. 
 

CREATE TABLE [dbo].[TestHtml](

[ID] [int] IDENTITY(1,1) NOT NULL,

[PageText] [varchar](MAX) NOT NULL,

CONSTRAINT [PK_TestHtml] PRIMARY KEY CLUSTERED
 

SELECT * FROM TestHTML WHERE Contains(PageText, @searchterm);
 
Could someone please tell me what I need to do to enable FTS on varchar(MAX) or Text columns?
 
 

View Replies !   View Related
What Is The 'Data Type' For A Field Containing Both Text And Number, In VS Studio 2005, Databases?
For a field in a database to accept both text and number what 'Data Type' should I be using, i.e. 23t5

View Replies !   View Related
Error 409: The Assignment Operator Operation Could Not Take A Text Data Type As An Argument
How can I make it work when I need to pull out a field which is text type using a stored procedure? Please help!!!Thanks
I am getting the following error
Error 409: The assignment operator operation could not take a text data type as an argument
===========my sp=================================
CREATE PROCEDURE [dbo].[sp_SelectABC]
(@a varchar(50) output,
@b text output
)
AS
set nocount on
select @a=name, @b= description from ABC

GO

View Replies !   View Related
Code Page Translations Are Not Supported For The Text Data Type. From: 1252 To: 950.
Code page translations are not supported for the text data type. From:1252 To: 950.I would like to know what this message means. I also installed thelanguage packs in advanced settings, Everything is set to English. Mywindows XP computer is XP English. For some reason I cant get an updateto go thru using ADO. like Recordset.UpdateAlthough other routines using .update workAny ideas?

View Replies !   View Related
TEXT Data Type Column: Replacing Chars : Why Isn't This Routine Working?
Hi;I am trying to write a rountine ( below ) that will go into a colum oftext data type ( fae.pmcommnt ) locate the word "to" and replace it.I have the routine below. I get no error messages, but it also seemsto do nothing :).Any clues would be greatly appreciated.ThanksSteve================================================== =============declare @ptrP intSELECT @ptrP = PATINDEX('%to%', pmcommnt)from fae where projid ='00013'declare @ptrPC binary(16)select @ptrPC = TEXTPTR(pmcommnt)from faeif( TEXTVALID ('fae.pmcommnt', @ptrPC ) > 0 )print 'works'print @ptrPUPDATETEXT fae.pmcommnt @ptrPC @ptrP 2 'JJ'select projid, pmcommnt from fae

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved