Query from HQ Customer

Oct 27, 2005 1 Replies

Does anyone know the query that is run in the Customer Purchase history window, when you click the properties on a Customer, then Purchase History and it shows everything they have purchased and from what store?



Does anyone have the actual query that is run there? I have tried to recreate it but have had limited success. Somehow my transactions are getting mixed up. I am trying to write the query into a internal intranet page so that any of our employees can see the purchase history without actually having to be at the POS or in Manager. It will also be viewable via the internet via secured login.



Any help would be greatly appreciated.



Thanks, Nick


Try this:

select b.[time], a.transactionnumber, a.comment, d.itemlookupcode, d.description, a.price, a.quantity from transactionentry a LEFT OUTER JOIN [transaction] b on a.transactionnumber = b.transactionnumber and a.storeid = b.storeid LEFT OUTER JOIN customer c on b.customerid = c.id LEFT OUTER JOIN item d on a.itemid = d.id where c.accountnumber = 'ACCOUNTNUMBER'

('ACCOUNTNUMBER' should be the actual accountnumber of the desired customer)

Casey Hans> Does anyone know the query that is run in the Customer Purchase history

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required