473,387 Members | 1,572 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,387 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 1627

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 ...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.