> SELECT avendor,yvendor,color,size,sku,orderdate
> FROM table1, table2
> WHERE orderdate >= #submitted.startdate# AND
orderdate <= #submitted.enddate#
As mentioned, the query doesn't indicate how table1 and
table2 are related. So the result is a CROSS JOIN. Probably not
what you want to do
http://en.wikipedia.org/wiki/Join_(SQL)#Cross_join
Its a good practice to always specify the column source when
using JOINS, either using an "alias" or the full table name. Even
if its not always required, it increases readability.
SELECT table1.avendor,
table1.vendor,
table1.color,
...
FROM table1 INNER JOIN table2
ON table1.someSharedColumn = table2.someSharedColumn
WHERE ...