strQuery = "SELECT f.CustId, min(f.UploadDate)as FirstDate, max(fd.UploadDate)as LastDate from FileDescription f, FileDescription fd, Customer where
f.CustId = fd.CustId and f.FileID = fd.FileID
and not(DateDiff(day, f.UploadDate, getdate()) > "& numDays & " )
Group by f.CustId Order By f.CustId"
StrQ = "SELECT CustName from Customer where CustID =" & rsbac("CustId"
I currently have two queries, strQuery firstly finds all the CustID's and dates that satisfy the conditions in that SQL string. The second query StrQ finds the CustName using the CustId found from the first query. My question is , is there a way of elminating the StrQ by enabling the first query to extract the CustName as well. I've tried puting CustName in the select part of the first query but I get errors.
Grateful for any help.
Thanks.
f.CustId = fd.CustId and f.FileID = fd.FileID
and not(DateDiff(day, f.UploadDate, getdate()) > "& numDays & " )
Group by f.CustId Order By f.CustId"
StrQ = "SELECT CustName from Customer where CustID =" & rsbac("CustId"
I currently have two queries, strQuery firstly finds all the CustID's and dates that satisfy the conditions in that SQL string. The second query StrQ finds the CustName using the CustId found from the first query. My question is , is there a way of elminating the StrQ by enabling the first query to extract the CustName as well. I've tried puting CustName in the select part of the first query but I get errors.
Grateful for any help.
Thanks.