Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chef423
Starting Member
15 Posts |
Posted - 2014-09-21 : 18:32:23
|
SELECT c.cust_fullname AS Customer, c.cust_membership_id AS Account#, SUM(t.c_amount) AS ChargeTotalFROM Transactions AS tINNER JOIN Customers AS c ON t.s_ref_num = c.cust_id where s_credit_tran_type = 'House Account' and b_cancel = 0GROUP BY c.cust_fullname, c.cust_membership_idI need this simple query to run automatically every night at 11:30pm, everyday, but only for the Current Day's business.Any tips on how to achieve this?My file will output to .CVS format for import into Quickbooks. I'd love to have it import directly INTO Quickbook's, but I am not at that level yet..Thanks to anyone who is taking time to help.Chris |
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2014-09-22 : 04:54:58
|
you need to add a where clause to your query to filter current day records.you can schedule the script through sql agent job to run daily at 11:30 pm.Javeed Ahmed |
|
|
|
|
|