473,433 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,433 software developers and data experts.

Access 2010 Union Query Truncating problem

HI,

I'm having trouble with my SQL code truncating memo fields in my union query. Here is the code:

Expand|Select|Wrap|Line Numbers
  1. SELECT Projects.[11-14_Number] AS Expr1
  2.    , Input2012 AS 2012Input
  3.    , [Federal_9-12] AS Famt
  4.    , [Copy of 11-14 TIP Status Project List Report for all years Query].[Local_9-12] AS Lamt
  5.    , [Project Funding].Project_Funding AS F
  6.    , [Project Sponsor].Project_Sponsor AS S
  7.    , Projects.ProjectName as Name
  8.    , [FirstOfProject_Status_9-12] AS Status
  9. FROM [Copy of 11-14 TIP Status Project List Report for all years Query]
  10. WHERE Input2012=yes
  11. UNION ALL SELECT Projects.[11-14_Number] AS Expr1
  12.    , Input2011 AS 2011Input
  13.    , [Copy of 11-14 TIP Status Project List Report for all years Query].[9-12_Federal_2011] AS Famt
  14.    , [9-12_Local_2011] AS Lamt
  15.    , [Project Funding].Project_Funding AS F
  16.    , [Project Sponsor].Project_Sponsor AS S
  17.    , Projects.ProjectName as Name
  18.    , [FirstOfProject_Status_9_11] AS Status
  19. FROM [Copy of 11-14 TIP Status Project List Report for all years Query]
  20. WHERE Input2011=yes;

The project status field gets truncated.
Jun 19 '13 #1
1 2062
zmbd
5,501 Expert Mod 4TB
Moved your thread to the Access forum... SQL and Access-SQL can be very different beasties :)

You really should try to use shorter names for queries, tables, fields, etc...

You should not use any of the reserved words such as "Name" for a field name, nor should you use any of the other non-alphanumerics as they can and will cause you issues: Access 2007 reserved words and symbols

You have not indicated which field is(are) your memo field(s).

You have not indicated which version of Access you are using.

You have not indicated what it is that you are trying to do with the query; however, the following may give you the reason:
Allen Browne - Truncation of Memo fields

In Access tables, Text fields are limited to 255 characters, but Memo fields can handle 64,000 characters (about 8 pages of single-spaced text) - even more programmatically. So why do memo fields sometimes get cut off?

Queries
Access truncates the memo if you ask it to process the data based on the memo: aggregating, de-duplicating, formatting, and so on.

Here are the most common causes, and how to avoid them:
(...)
UNION query:
  • A UNION query combines values from different tables, and de-duplicates them. This means a comparing the memo field, resulting in truncation.
  • In SQL View, replace UNION with UNION ALL.
(...)
Jul 2 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paradigm | last post by:
I am using Access 2K as a front end to a MYSQL database. I am trying to run a Union query on the MYSQL database. The query is (much simplified) SELECT as ID from faxdata UNION SELECT as ID ...
0
by: s_gregory | last post by:
The mdb is considerable size 70 +- mb. A complex union query was working well, but when an additional union select... was added into the query, selecting identical fields from a different source,...
1
by: Richard Coutts | last post by:
I have two select queries, "qryJobSpecsAlwaysList" and "qryJobSpecsBySchedCat," that list some fields, including a Memo field called "Description" that can contain text values that can be 500...
2
by: marco | last post by:
Dear List, as it seems, MS SQL as used in Access does not allow a select INTO within a UNION query. Also, it seems that a UNION query can not be used as a subquery. Maybe my (simplified)...
5
by: BillCo | last post by:
I'm having a problem with a union query, two simple queries joined with a union statement. It's created in code based on parameters. Users were noticing some inconsistant data and when I analysed...
1
by: SAKTHIVEL | last post by:
Hi, Im developing applications using Visual Basic and MS-Access 2003. Union query solves my specific problems. But I unable to call this query from visual basic form like other queries. The query...
1
by: ebasshead | last post by:
Hi Everyone I have four queries that Ive joined in a union query and want to add a date criteria ei between and including date A and date B. Ive tried a few things but getting errors. Can someone...
2
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been...
14
by: bknabl | last post by:
I'm very new to creating union queries. I understand the purpose but not how to properly implement it for my purpose. So far I've created to perfectly fine crosstab queries. One shows input on a date...
1
doma23
by: doma23 | last post by:
Hi, my problem is next: I have existing table like this: 01/01/2010 02/01/2010 03/01/2010 code1 val11 val12 val13 code2 val21 val22 ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.