Link to home
Start Free TrialLog in
Avatar of tricks801
tricks801

asked on

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

SELECT MIN(Memo) FROM PmtsMemos WHERE PmtsMemos.InfinityRecNo = 0

in this example the memo field is ntext.

What can i do?

Avatar of SweatCoder
SweatCoder
Flag of United States of America image

what's the problem? an error?
Avatar of tricks801
tricks801

ASKER

ok, the Min was a mistake...but this is found as a subquery, so it is still coming up with the same error
sorry....the error is stated in the title:  The text, ntext, and image data types are invalid in this subquery or aggregate expression.
a very simplified version of the actual query...
select (SELECT (Memo) FROM PmtsMemos WHERE PmtsMemos.InfinityRecNo = 620073)
ASKER CERTIFIED SOLUTION
Avatar of seangw
seangw

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the agg function was a mistake... i fixed it by cast(memo as nvarchar)

thanks