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

Error "data type mismatch in criteria expression"

Hi

I am getting the above error when I try to run the union query shown
below

select all [purchase cheque date] as [Date],[purchase cheque number]
as [Cheque No/DD], [previous owner name] as [Payee], [Purchase Price]
as [Amount], [VAT21] ,[VAT20], [VAT125] ,[VAT135], [Stock for Resale @
21], [Stock for Resale @ 20] ,[Not for Sale @ 21] as [21],[Not for
Sale @ 20] as [20],[Not for Sale @ 125] as [125],[Not for Sale @ 135]
as [135], [Not for Sale @ 0] as [0]
from [find cars for VAT analysis2]

UNION all select [Paymentdate] as [Date],[chequenumber] as [Cheque
No/DD], [payee details] as [Payee], [SumOfTotalPayment] as [Amount],
[VAT21],[VAT20], [VAT125],[VAT135] ,[Stock for Resale @ 21], [Stock
for Resale @ 20], [Not for Sale @ 21] as [21],[Not for Sale @ 20] as
[20],[Not for Sale @ 125] as [125], [Not for Sale @ 135] as [135],[Not
for Sale @ 0] as [0]
from [find non-car cheques for VAT analysis2]

UNION ALL select [Paymentdate] as [Date],[chequenumber] as [Cheque
No/DD], [payee details] as [Payee], [SumOfTotalPayment] as [Amount],
[VAT21] ,[VAT20], [VAT125] ,[VAT135] , [Stock for Resale @ 21], [Stock
for Resale @ 20], [Not for Sale @ 21] as [21],[Not for Sale @ 20] as
[20],[Not for Sale @ 125] as [125], [Not for Sale @ 135] as [135],
[Not for Sale @ 0] as [0]
from [find non-car DD's for VAT analysis2];

What is puzzling me is that each of the 3 component queries above runs
happily without any errors. Additionally any subset of 2 of the above
3 queries runs as a union query, and the union query itself ran
happily up until a few months ago.

Any help greatly appreciated
Nov 13 '05 #1
0 981

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup...
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,...
0
by: John Smith | last post by:
Hi I am getting the above error when I try to run the union query shown below select all as , as , as , as , ,, ,, , , as , as , as , as , as from
8
by: eminemence | last post by:
Hi, I have been trying to get STLPort work for Symbian. I am using CodeWarrior compiler and it spews this errors namely *************************************************************************...
4
by: bob95226 | last post by:
Hi All, I wrote a VB.NET control in Visual Studio 2003 IDE, I am trying to re-compile it with command line compiler vbc.exe like this: vbc /t:library /out:my_control.dll my_control.vb However...
1
by: jmarr02s | last post by:
I am using MS Access 2003 and get the following error "Data type mismatch in criteria expression" Any suggestions on how to fix this? This is my code: SELECT IIf(=15 Or =19, "15 og 19",...
0
subashini Thiyagarajan
by: subashini Thiyagarajan | last post by:
Any one can help me in this error Error Type: Provider (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done....
17
imrosie
by: imrosie | last post by:
I've tried this string to Sum up payments, moving brackets and paren's different ways, I still get error 'type mismatch'....not sure why. Can anyone point me in the right direction?? thanks ...
10
by: dstorms | last post by:
Hi, I'm trying to create a button on a form that: 1. Takes the ComputerID from the form linked to Table 1, 2. Checks Table 2 for a matching ComputerID, and 3. Opens the query qryEditData, and...
3
by: martin DH | last post by:
I would definitely appreciate any help with this problem as soon as possible. Thanks! I have a report that should display the results of a query based on two tables (tblClient and tblResult,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.