Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NTEXT into a SELECT

Status
Not open for further replies.

jorg32

Programmer
Jul 10, 2003
57
0
0
BE
If I make a select that's include a column with datatype "NTEXT", length= 16 I receive the next ERROR:

"The text, ntext, and image data types are invalid in this subquery or aggregate expression."

Can I change the length or do I have to put something in front of the column name in the Select.
 
Seeing the full select statement might help to diagnose this ;-)
 
The full select (this is a select in a select, but all the rest of it works) is :

select top 1 omschrijving1 from TWO TWO2 join k1 on (two2.lang=k1.taalkode)
where TWO2.tekstid='RONDER'+replace(str(max(K4RAPPELNR)),' ','') and k4.k1key=k1.k1key


The column "omschrijving1" is the one with NTEXT.
 
from Books Online:

"The ntext, text and image data types are not allowed in the select list of subqueries."

Bottom line is you can't select an ntext field in a subquery, you will have to find some other way of accomplishing your task.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top