mphillip85
asked on
vb.net 2003. Filter Dataset on a datevalue field to capture between 30-60 days from the inv date.
vb .net 2003. I would like to filter a dataset that has a invoice due date and do an aging report. Filter for records that are between 30-60 days past the invoice due date. How can I do this?
Thanks
Thanks
ASKER
SQL 2005 server. I would prefer to pass the criteria through the dataset commandtext. Otherwise I will have to create several datasets to connect to the view on the server. I know that it will speed things up on the backend since it is a 8 processor server 8 gig ram. scsi drives.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using this:
InvPaymentDueDate BETWEEN DATEADD(day,-59,InvPayment DueDate) AND
DATEADD(day,-30,InvPayment DueDate) ORDER BY InvPaymentDueDate
I even put the -30 to -1 and I know I have invoices that fall in that area and it did not get them
What am I doing wrong?
The InvPaymentDueDate >= DATEADD(day,-90,InvPayment DueDate) seems to take all the records.
InvPaymentDueDate BETWEEN DATEADD(day,-59,InvPayment
DATEADD(day,-30,InvPayment
I even put the -30 to -1 and I know I have invoices that fall in that area and it did not get them
What am I doing wrong?
The InvPaymentDueDate >= DATEADD(day,-90,InvPayment
Since I can't see the data, and I don't know about localization settings for your SQL Server instance, it is tough for me to spot any reason for your observations.
Bob
Bob
ASKER
So I guess I will try in the view and see what results I get, on the server and trace it from there.
ASKER
Whats the best way to actually see the query string results to see if the values are correct?
ASKER
Can you give me an example of what I should expect. Such as with your syntax replace the values that would actually be filtered against, since I must be missing some logic somewhere.
Thanks.
Thanks.
1) Is this SQL Server 2005 Express Edition?
2) Do you have SQL Server Management Studio installed?
Bob
2) Do you have SQL Server Management Studio installed?
Bob
Bob