I have a mainframe background and fairly new to SQL/ASP. I need some help with the following query:
----------------------------------------------------------
Select qry.*, c.* from Client c Inner Join ( Select * from Buyer where (SaleNumber = 'nyc68603') and (Hammer > 1000) and (CountryCode = 'us') and (State = 'ny' or State = 'nj' or State = 'ct')) as qry on c.AccountNumber = qry.AccountNumber
-----------------------------------------------------------
I am trying to speed this up and was wondering - instead of 'joining' the Client as above, would it be more efficient to select the Buyers and then relate the extracted set to Clients? If so, could someone please let me know how.
Thanks,
Ric
----------------------------------------------------------
Select qry.*, c.* from Client c Inner Join ( Select * from Buyer where (SaleNumber = 'nyc68603') and (Hammer > 1000) and (CountryCode = 'us') and (State = 'ny' or State = 'nj' or State = 'ct')) as qry on c.AccountNumber = qry.AccountNumber
-----------------------------------------------------------
I am trying to speed this up and was wondering - instead of 'joining' the Client as above, would it be more efficient to select the Buyers and then relate the extracted set to Clients? If so, could someone please let me know how.
Thanks,
Ric