Text Data Type

Results 1 to 2 of 2

Thread: Text Data Type

  1. #1
    Join Date
    Dec 1969

    Default Text Data Type

    Hi! <BR> I have a text data type field, which will be used as an input parameter in the Stored Procedure.<BR>I have to select * From Table where FieldName Like &#039;%&#039; + @InputParam + &#039;%&#039;<BR><BR>I will always get an error : Invalid operator for data Type.<BR><BR>I have tried to use sql_variant, but it seems like Text type is always an exception for alternative methods.<BR><BR>Good ideas?<BR>Thank you!

  2. #2
    Join Date
    Dec 1969

    Default Try VARCHAR...

    ...or NVARCHAR instead of TEXT.<BR><BR>I don&#039;t think you can use TEXT in string expressions, because SQL has no idea how large that TEXT data might be (up to billions of bytes) and doesn&#039;t want to try to preallocate a buffer for the concatenation.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts