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

Attempting and IIF statement with an AND Getting an error...

P: 1
Here is my statement. I am using the design view for making queries because I'm still very new to all this and I can't grasp the SQL view yet. So here it is:
Expand|Select|Wrap|Line Numbers
  1. Tax: IIf([Customers].[State/Province]="MI" And [Products].[Taxable]="Yes",CCur([Quantity]*[Unit Price]*(1-[Discount]))*0.06,0)
Tax is an expr that is trying to be calculated.

Here is my error:

The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement. (Error 3258)

How should I break this up into two queries?

Thanks for your help.
Aug 7 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,758
I'm afraid the error message doesn't point to a problem with your IIf() statement.

We will need to see the SQL statement you have if we're to have any chance of helping.

To see it for yourself (in order to copy it and paste it in here), open the query in design view; when opened, select View / SQL View.
Aug 7 '08 #2

Post your reply

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