March 25, 2008 at 2:15 pm
I'm using sql2000.
I have a table with 4 text fields which need to be referenced in a view.
The fields are called : Overview, description, ingredients, usage
What I want to do is the following:
create view MyView
select
productid,
overview + '
' + description + '
' + ingredients + '
' + usage as LongDescription
from
myTable
Then, in my code I would write:
select productid,LongDescription from MyView where productid=123
The data in the fields is > 8000 chars so I can't cast the data as varchar(8000)
Anyone have any other ideas??
I was thinking about creating a function, but I'm not 100% sure how??
March 26, 2008 at 12:54 pm
Can you cast it as text?
August 26, 2008 at 9:53 am
Even if you concatenate and convert to text using something like...
[font="Courier New"]SELECT CAST('1'+'2'+'3' AS TEXT)[/font]
...you still won't be able to see more than 8192 characters in a single column, view or not... please see the following article for an outstanding bit of information on the TEXT datatype.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy