By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

Error "data type mismatch in criteria expression"

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.