Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query 2 tables with no join 1

Status
Not open for further replies.

mgallot

MIS
Jan 22, 2001
93
US
Here is the query I am trying to run with a command in Crystal:

SELECT `sheet1`.`Time`, Count(`sheet1`.`ID`) As CountOfConcurrent
FROM `sheet1` `sheet1`, `Concurrent For Crystal` `Concurrent_For_Crystal`
WHERE `sheet1`.`ID`>=`Concurrent For Crystal`.`AT` and `sheet1`.`ID`<=`Concurrent For Crystal`.`TT`
GROUP BY `Sheet1`.`Time`


The data is coming from a table and a view in Access (same DB). This query runs fine in Access, but when I try to run it in Crystal it doesn't seem to like my WHERE clause and I get an error:

Query Engine Error: 'DAO Error Code: 0xbf5
Source: DAO Database
Description: Too few parameters. Expected 2.'

Any ideas how I can modify this?
 
I just tested this with the Xtreme database and got a similar error, when I had a typo. I notice above that you are using underscores in your alias for Concurrent for Crystal in one place but nowhere else. Try removing them and see if that does it. You are creating the join in the where clause, so that isn't the issue, I don't think.

-LB
 
Thanks! That did it, I copied from some SQL that Crystal had generated and didn't notice those underscores.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top