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 |
fdtoo
Starting Member
28 Posts |
Posted - 2004-09-19 : 05:33:02
|
I have the following fieldname in an Access_Table:Field 1 = Cust_ID (Primary key)Field 2 = DateField 3 = DescriptionField 4 = Inv_NoField 5 = AmountMy SQL Input syntax are:"Select distinct Cust_ID,Date,Description,Inv_No,Amount from Access_Table WHERE Date <Now()-30 And Date >Now()-60"It failed to generate the result I want,anywayMy "Required" Output is:Cust_ID Date Description Inv_No >30DYS >60DYS8000 21/05/2004 PC RAM 00120 2008000 26/06/2004 Modem 00121 180 --------------------------------------------------------------- Total: 180 200---------------------------------------------------------------8001 22/04/2004 Cable 05510 508001 23/05/2004 HD 05520 210--------------------------------------------------------------- Total: 260--------------------------------------------------------------- Grand Total: 180 460 can anyone help? ThanksFrom:Cady Steldyn |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-09-19 : 19:26:39
|
First of all, replace your Date <Now()-30 with Date < DateAdd("d",-30,Now) If it still doesn't work, post some sample data for us to work with. |
 |
|
|
|
|