473,379 Members | 1,174 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,379 software developers and data experts.

Why DISTINCT causes error 3464

6
Hi

I have a problem with SELECT DISTINCT query.
I'm trying to solve why it causes error 3464.

Guess that problem might be cause by one field.
The source table has text(17) field from which I need to extract 'YYMMDD' date and convert it to date/time format. I convert only from not null and 17char strings

I use following function in SQL statement

IIf(Len(Trim(D.NRPZ))=17 and not D.NRPZ is null,DateValue(Format(Mid(D.NRPZ,8,6),"0000-00-00")))

Source for this query is a subquery that joins two external DBF tables (about 500000 records).

1.
What i have found that top 6991 do not cause the problem but 6992 do.
I have made copy of these 6992 record and put into local table.
The original query works fine on this data set

2. (with subquery limited to top 6992 as source)
Query with only one field with the above function - works fine
Query with 14 fields + one with the above function - works fine
Query with 15 fields + one with the above function - DOES NOT WORK !!!
I have used 15th field instead of 14th to see if this caused the problem but not - works fine
I've added 15th field that is existing field wrapped in MID function - works fine
I've added 16th field that is existing text field joined with & - works fine
I add 17th field numeric, that is new field from source subquery, - DOES NOT WORK !!!
Query with all fields except the one with the above function - works fine

As soon as I remove DISTINCT the query works fine.
I've tried to debug the problem but as I wrote in point 1. local copy of 6992 records work fine for the query.

The error message itself does not help anyway to solve the problem.
Making it one more reason to hate this M$ product.

My question are:
Can anybody explain what exactly could couse the problem?
Is there known limit to use of DISTINCT in Access?
Dec 4 '09 #1
1 2648
missinglinq
3,532 Expert 2GB
The problem is that the use of DISTINCT in Access produces a recordset that cannot be updated, which is what you're actually trying to do here.
Dec 4 '09 #2

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

Similar topics

0
by: BobG | last post by:
-- The issue This following query works fine on Toad and PowerBuilder yet when it is run on SQLPlus I get: "ORA-03113: end-of-file on communication channel" When I remove the distinct from the...
2
by: Chicken Kebab Abdullah | last post by:
Does anyone know why I get the error 3464 Data type mismatch from the following code. I have a form with a combo(to choose a consumable) and 2 list boxes on it. list on left is all printers...
1
by: Will | last post by:
In the following code I am attempting to open a query and edit the lastMaintenance field for a particular equipment number. My code looks like this: Dim db As Database Dim rs As Recordset Dim...
5
by: ddd | last post by:
Hi, I am having problems with using the DrawToDC of the MSHTML.iHTMLElementRender in a VB.net application. For some reason I am getting a "catastrophic error". I am basing the code on c#...
3
by: Venkat | last post by:
This is the piece of code in Early Binding and works as expected. --------------------------------------------------------------------------- using ControlLicenseService LicenseInfoClient lic =new...
5
by: Eric Sabine | last post by:
the second I add <appSettings> </appSettings> to my web.config file (just after the <system.web>), my web application will no longer run. I get an error that reads: Error while tyring...
2
by: Frank van Vugt | last post by:
Hi, Not exactly a showstopper, but I noticed this behaviour: db=# create table f1 (id int, value int); CREATE TABLE db=# insert into f1 select 1 as id, null; INSERT 25456306 1
1
by: Angus | last post by:
Why moving a function from protected to public area in class causes error C2556 - overloaded function differs only by return type I have a protected function called GetState like this: enum...
1
by: Bamboz | last post by:
Dears, I have a table named Tasks that Contains all the Information about my employee , i am making a Form to open a report based on Employee Name, Tasks done, Date. but i'm getting error with this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.