W
whincup
My UNION query seems to be truncating memo fields, even with no grouping
statement in the SQL.
I am reporting the results of some research interviews. For each
interview, there are memo fields, each with a rating (1 - 4) based on
content. The table has:
"interviewID" (Number) as its key, and fields
"memo1" (memo)
"memo1rating" (Number)
"memo2"
"memo2rating"
etc.
I want to end up being able to report all the memos in order of rating
and interviewID, without distinguishing whether they come from the memo1
column or the memo2 column:
rated 1 -- ID & memo, ID & memo, ID & memo,
rated 2 -- ID & memo, ID & memo, ID & memo,
etc.
One interview can have several memos at the same rating.
My simple Union Query works great, except that it truncates the memo field:
SELECT [memo1rating], [interviewID], [memo1]
FROM
WHERE [memo1rating] <> 0
UNION SELECT [memo2rating], [interviewID], [memo2]
FROM
WHERE [memo2rating] <> 0;
The truncation even takes place when I strip out the WHERE clauses.
1. Is there any way to fix the query?
2. Is there some other way of approaching this that does not involve a
UNION query?
Thanks for any help you can give.
-- Greg Whincup
statement in the SQL.
I am reporting the results of some research interviews. For each
interview, there are memo fields, each with a rating (1 - 4) based on
content. The table has:
"interviewID" (Number) as its key, and fields
"memo1" (memo)
"memo1rating" (Number)
"memo2"
"memo2rating"
etc.
I want to end up being able to report all the memos in order of rating
and interviewID, without distinguishing whether they come from the memo1
column or the memo2 column:
rated 1 -- ID & memo, ID & memo, ID & memo,
rated 2 -- ID & memo, ID & memo, ID & memo,
etc.
One interview can have several memos at the same rating.
My simple Union Query works great, except that it truncates the memo field:
SELECT [memo1rating], [interviewID], [memo1]
FROM
WHERE [memo1rating] <> 0
UNION SELECT [memo2rating], [interviewID], [memo2]
FROM
WHERE [memo2rating] <> 0;
The truncation even takes place when I strip out the WHERE clauses.
1. Is there any way to fix the query?
2. Is there some other way of approaching this that does not involve a
UNION query?
Thanks for any help you can give.
-- Greg Whincup