I have a query that gets the current session, named GetCurrentSession:
SELECT MAX(Session.[SessionID]) as Sess
FROM [Session];
This query works fine and returns the correct value.
Then, I want to use it to get client purchases from only the current session:
SELECT Purchases.PurchID, Purchases.PartID, Purchases.PurchDate, Purchases.Count, Purchases.PayType, Purchases.Paid, Purchases.TicketNumbers, Purchases.Delivered, Purchases.DeliveredDate, Purchases.PaymentDate, Purchases.PaidOut, Purchases.PaidOutDate, Purchases.Reconciled, Purchases.ReconcildedDate, GetCurrentSession.Sess
FROM Purchases inner join GetCurrentSession
on (Purchases.SessionID)=GetCurrentSession.sess;
The problem is whenever I run this query I get a dialog box 'Enter Parameter Value' for 'GetCurrentSession.Sess.
Is this not allowed? Is there a way to do this?
Thanks,
Shane
SELECT MAX(Session.[SessionID]) as Sess
FROM [Session];
This query works fine and returns the correct value.
Then, I want to use it to get client purchases from only the current session:
SELECT Purchases.PurchID, Purchases.PartID, Purchases.PurchDate, Purchases.Count, Purchases.PayType, Purchases.Paid, Purchases.TicketNumbers, Purchases.Delivered, Purchases.DeliveredDate, Purchases.PaymentDate, Purchases.PaidOut, Purchases.PaidOutDate, Purchases.Reconciled, Purchases.ReconcildedDate, GetCurrentSession.Sess
FROM Purchases inner join GetCurrentSession
on (Purchases.SessionID)=GetCurrentSession.sess;
The problem is whenever I run this query I get a dialog box 'Enter Parameter Value' for 'GetCurrentSession.Sess.
Is this not allowed? Is there a way to do this?
Thanks,
Shane
Last edited: