473,406 Members | 2,467 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,406 software developers and data experts.

Data truncated in MS Access UNION query

5
Hi All,

I'm using ODBC to link my Access 2000 database tables to MS SQL Server 2000 database and create queries and reports in Access. When I use a single query to retrieve a text field with large data, all data in the field are retrieved. However, when I use the same query in a UNION query, the data of the same field are truncated ( may be 255 characters but I didn't actually count ), but this seems to happen on certain records only.

Please help. Thanks
Feb 7 '07 #1
6 5221
MMcCarthy
14,534 Expert Mod 8TB
Hi All,

I'm using ODBC to link my Access 2000 database tables to MS SQL Server 2000 database and create queries and reports in Access. When I use a single query to retrieve a text field with large data, all data in the field are retrieved. However, when I use the same query in a UNION query, the data of the same field are truncated ( may be 255 characters but I didn't actually count ), but this seems to happen on certain records only.

Please help. Thanks
The short answer to this is Access Memo fields don't preform well in Union queries.

Have a look at this tutorial.

Mary
Feb 7 '07 #2
RLau
5
Thanks, Mary.

The field concerned is a text field of size for 5000 characters in a MS SQL Server 2005 database. My MS Access is actually Access 2002. Does the UNION problem happen to large text field as well ?

The question is, the same set of data works fine in the same environment when retrieved by a single query. When I modified the query to a UNION query with the two queries a replica of the original one that works and the difference of the two queries is the WHERE parts. The puzzle is that happens to certain records only but other records with large text data are OK.

Still scratching my head ....


The short answer to this is Access Memo fields don't preform well in Union queries.

Have a look at this tutorial.

Mary
Feb 7 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Thanks, Mary.

The field concerned is a text field of size for 5000 characters in a MS SQL Server 2005 database. My MS Access is actually Access 2002. Does the UNION problem happen to large text field as well ?

The question is, the same set of data works fine in the same environment when retrieved by a single query. When I modified the query to a UNION query with the two queries a replica of the original one that works and the difference of the two queries is the WHERE parts. The puzzle is that happens to certain records only but other records with large text data are OK.

Still scratching my head ....
The large text field in SQL server is translated by Access as a memo field. Access only has two options Text field (max char size of 255) and Memo field. As the tutorial says anything outside of a basic query on this field just doesn't really work in access.

Mary
Feb 7 '07 #4
RLau
5
Thanks again, Mary.

I now understand the UNION problem and I'll avoid using this.

I have actually changed my query back to a single query by using a IIF function to condition the outcome of two DateDiff functions and that works fine. Processing time improves as well as there is only one pass of the dataset now.

Did Microsoft fix this known UNION problem in the latest Access release ?

Thanks,

RLau


The large text field in SQL server is translated by Access as a memo field. Access only has two options Text field (max char size of 255) and Memo field. As the tutorial says anything outside of a basic query on this field just doesn't really work in access.

Mary
Feb 7 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Thanks again, Mary.

I now understand the UNION problem and I'll avoid using this.

I have actually changed my query back to a single query by using a IIF function to condition the outcome of two DateDiff functions and that works fine. Processing time improves as well as there is only one pass of the dataset now.

Did Microsoft fix this known UNION problem in the latest Access release ?

Thanks,

RLau
The problem is really in the use of Memo fields as it is not just UNION queries that are affected. To the best of my knowledge M$ has made no effort to address this. It just doesn't handle text fields above 255 characters in any managable way.

Mary
Feb 7 '07 #6
NeoPa
32,556 Expert Mod 16PB
Thanks again, Mary.

I now understand the UNION problem and I'll avoid using this.

I have actually changed my query back to a single query by using a IIF function to condition the outcome of two DateDiff functions and that works fine. Processing time improves as well as there is only one pass of the dataset now.

Did Microsoft fix this known UNION problem in the latest Access release ?

Thanks,

RLau
They would see it as more of a feature than a problem.
Using Memo type fields in these circumstances (assuming it were supported) would be such a resource and processor overhead that implementing it is probably not such a great idea.
No one (IMHO) should be thinking of using text fields of that size anywhere that needs any processing on them (Sorting, Filtering etc - UNION has an implicit sort) except in extremis. Access simply forces a better design on the developer.
Feb 8 '07 #7

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

Similar topics

2
by: Jeff Blee | last post by:
I am hoping someone can help me. I am making a Access 97 app for a person and have run up against a problem to do with MS Graph. There is a table that has a number of data elements and a date field...
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,...
4
by: Kent Eilers | last post by:
The following query changes when I save it: ================================================================== SELECT AcctID FROM (SELECT as AcctID FROM tblOrderHeader UNION
1
by: Terencetrent | last post by:
I have created a query that examines qarterly sales for 5 regions in the country. The query contains data for the past 6 quarters for each region and calculates the perecentage of total sales for...
5
by: Sami | last post by:
I can create queries and reports based on info from one table. How do I create one using information from multiple tables. What do I need to make sure the information from one table will be...
1
by: heckstein | last post by:
I am working in Access 2002 and trying to create a report from our company's learming management system. I am not a DBA and most of my SQL knowledge has been self taught through trial and error. I...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
2
by: siech | last post by:
Hi, Helped by some genius programmers here on the forum I have used a UNION query to create a report that is ready to be exported to excel. The problem now is that I have a column...
13
by: chromis | last post by:
Hi, I have a query which updates the projects table of my database, however when I try to run my query with blank values i get the following error: Data truncation: Data truncated for column...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.