Hello,
I've created an .asp page that returns results from a memo field...I need to use Select DISTINCT, but when I do, the memo field gets truncated. When I remove the DISTINCT, the full memo field is displayed, but of course, I get too many records.
Has anyone encountered this before?
Thanks for your help!
Was this answer helpful ?
Yes No
Hi There,
Here it is. The Idea_Note is the memo field.
SQL="SELECT DISTINCT Tbl_IdeaExchange.Auto_Number, Tbl_IdeaExchange.Idea_Name, Tbl_IdeaExchange.Idea_Link, Tbl_IdeaExchange.Idea_Note FROM Tbl_IdeaExchange INNER JOIN (Tbl_JoinIdeaClassification INNER JOIN Tbl_ClassificationSystem ON Tbl_JoinIdeaClassification.ClassificationID = Tbl_ClassificationSystem.ClassificationID) ON Tbl_JoinIdeaClassification.IdeaID = Tbl_IdeaExchange.IdeaID WHERE Tbl_ClassificationSystem.Usergroup LIKE '" & Request.Form("whichusergroup2") & "'ORDER BY Tbl_IdeaExchange.Auto_Number"
Was this answer helpful ?
Yes No
Cast the memo field to a varchar, like this
Code:
SELECT Cast(memo as varchar(4000) As Memofield
Was this answer helpful ?
Yes No
Hi,
Thanks so much for your help!
I'm getting a syntax error though...I must be doing some little dumb thing? Sorry, I am a complete newbie at SQL and everything else!
SQL="SELECT DISTINCT Tbl_IdeaExchange.Auto_Number, Tbl_IdeaExchange.Idea_Name, Tbl_IdeaExchange.Idea_Link,
Cast(Tbl_IdeaExchange.Idea_Note as varchar(4000)) FROM Tbl_IdeaExchange INNER JOIN
(Tbl_JoinIdeaClassification INNER JOIN Tbl_ClassificationSystem ON Tbl_JoinIdeaClassification.ClassificationID =
Tbl_ClassificationSystem.ClassificationID) ON Tbl_JoinIdeaClassification.IdeaID = Tbl_IdeaExchange.IdeaID WHERE
Tbl_ClassificationSystem.Usergroup LIKE '" & Request.Form("whichusergroup2") & "' AND Tbl_ClassificationSystem.Category
LIKE '" & Request.Form("whichcategory2") & "' ORDER BY Tbl_IdeaExchange.Auto_Number"
Was this answer helpful ?
Yes No
I assume it isn't SQL server (probably Access?), just cast/convert it to whatever data type is equivalent to "text".
Was this answer helpful ?
Yes No
Was this answer helpful ?
Yes No