Hello,
I need to run a query on my SQL Database with multiple tables.. the query i am running is :
select invchea.TRACKING_NUMBER, invcdtl.price, invcdtl.qty_invoiced, invcdtl.U_FULLPART, invcdtl.detail_number, invcdtl.customer_po, invcdtl.SHIPPED_DATE
from dbo.invchea, dbo.invcdtl
where SHIPPED_DATE between '2011-11-01 00:00:00:000' and '2011-11-11 00:00:00:000'
The query SHOULD return about 50 records, instead it is returning millions of records.
When I run the query on only the INVCHEA table, I get the 50 records that I'm looking for, but I need the info from the INVCDTL table as well to make a useful spreadsheet. Can someone tell me what I am doing wrong here?
Thanks.
I need to run a query on my SQL Database with multiple tables.. the query i am running is :
select invchea.TRACKING_NUMBER, invcdtl.price, invcdtl.qty_invoiced, invcdtl.U_FULLPART, invcdtl.detail_number, invcdtl.customer_po, invcdtl.SHIPPED_DATE
from dbo.invchea, dbo.invcdtl
where SHIPPED_DATE between '2011-11-01 00:00:00:000' and '2011-11-11 00:00:00:000'
The query SHOULD return about 50 records, instead it is returning millions of records.
When I run the query on only the INVCHEA table, I get the 50 records that I'm looking for, but I need the info from the INVCDTL table as well to make a useful spreadsheet. Can someone tell me what I am doing wrong here?
Thanks.