L
Lisa
Hello,
I am fairly new to Access, but have worked w/ databases
for a long time.
I using Access to access the our SQL server tables from MS
Great Plains using ODBC links. I am trying to get a
commissions report based on multiple criteria and have
tried everything, but keep getting a variety of errors.
It works just fine, except this month I needed to add a
criteria based on customer class which made me add a new
table link. I added the table to the query and it says
that "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 join in your
SQL statement." I created a query using just this new
table and it works fine. Then I tried to add the query to
my query or SQL statement to the query and I don't know
what I'm doing. I couldn't get the expression builder to
create a new field using the new query it asks me
to "enter parameter value". Then I tried to copy the SQL
statement into the query and it says "check the subquery's
syntax and enclose the subquery in parenthesis". I add
parenthesis and I get this "You may have entered an
operand without an operator" Now what should I try?
Here is the SQL statement from the query w/ the new table
for customer class.
SELECT [dbo_RM00101].[CUSTNMBR], [dbo_RM00101].[CUSTNAME],
[dbo_RM00101].[CUSTCLAS]
FROM dbo_RM00101, dbo_SOP10101 INNER JOIN (dbo_RM00102
INNER JOIN dbo_SOP30200 ON [dbo_RM00102].[CUSTNMBR]=
[dbo_SOP30200].[CUSTNMBR]) ON [dbo_SOP10101].[SOPNUMBE]=
[dbo_SOP30200].[SOPNUMBE]
WHERE ((([dbo_RM00101].[CUSTCLAS])="VISION SOURCE" Or
([dbo_RM00101].[CUSTCLAS])="RETAIL"));
If I use the above SQL statement in the query where should
I add it (Field or Criteria".
Thank you in advance.
Lisa
(e-mail address removed)
I am fairly new to Access, but have worked w/ databases
for a long time.
I using Access to access the our SQL server tables from MS
Great Plains using ODBC links. I am trying to get a
commissions report based on multiple criteria and have
tried everything, but keep getting a variety of errors.
It works just fine, except this month I needed to add a
criteria based on customer class which made me add a new
table link. I added the table to the query and it says
that "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 join in your
SQL statement." I created a query using just this new
table and it works fine. Then I tried to add the query to
my query or SQL statement to the query and I don't know
what I'm doing. I couldn't get the expression builder to
create a new field using the new query it asks me
to "enter parameter value". Then I tried to copy the SQL
statement into the query and it says "check the subquery's
syntax and enclose the subquery in parenthesis". I add
parenthesis and I get this "You may have entered an
operand without an operator" Now what should I try?
Here is the SQL statement from the query w/ the new table
for customer class.
SELECT [dbo_RM00101].[CUSTNMBR], [dbo_RM00101].[CUSTNAME],
[dbo_RM00101].[CUSTCLAS]
FROM dbo_RM00101, dbo_SOP10101 INNER JOIN (dbo_RM00102
INNER JOIN dbo_SOP30200 ON [dbo_RM00102].[CUSTNMBR]=
[dbo_SOP30200].[CUSTNMBR]) ON [dbo_SOP10101].[SOPNUMBE]=
[dbo_SOP30200].[SOPNUMBE]
WHERE ((([dbo_RM00101].[CUSTCLAS])="VISION SOURCE" Or
([dbo_RM00101].[CUSTCLAS])="RETAIL"));
If I use the above SQL statement in the query where should
I add it (Field or Criteria".
Thank you in advance.
Lisa
(e-mail address removed)