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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text truncation in queries

Status
Not open for further replies.

cubi

IS-IT--Management
Sep 20, 2001
32
US
Hi,

I am using Access 2003 and one of my queries returns truncated text -- truncated from the front. I use DISTINCT in my query. When I remove DISTINCT the texts look fine.

Has anyone seen this problem before?

Thank you!
 
Hi,

Could you explain? Please post an example of the SOURCE DATA, SQL, and the query results.

Skip,
[sub]
[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue][/sub]
 
Has the original truncated text more than 255 characters ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Why can't you just leave the "Distinct" out of the query. Distinct is similar to Group By. You might want to try DISTINCTROW.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
The query is kind of long, but it looks like:

SELECT DISTINCT AGENCY_ID, PROGRAM_ID, ACTIVITY_ID, ... DESCRIPTION
FROM AGENCY, PROGRAM, ACTIVITY, ...
WHERE ...

I used DISTINCT to get unique values. The text value in the DESCRIPTION field es truncated.

Without DISTINCT the query returns 3 times as many rows due to duplication. I also tried DISTINCTROW, which eliminates some duplication, but not exactly what I want.

Thank you all for your input.
 
Without DISTINCT the query returns 3 times as many rows due to duplication
Even with JOIN clauses ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Use:
GROUP BY AGENCY_ID, PROGRAM_ID, ACTIVITY_ID, ...
With a column of First([Description]).

You could also try create the distinct query first without the Description field. Then create another query that is based on the distinct query and adds the table/query with the Description field.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top