on 05-04-2009 7:27 AM
Hi All,
I am having a little problem with a query where I want to set it up as an alert. The problem seems to lie with the getdate function in my query. I want to return all invoices for the current day that have discounts assigned to them however it seems that when I use the getdate function it is not working. Does somebody know how I can get around this please.
Here is my query I wrote in the words not equal as it seems it does not show when I post it.
SELECT DocNum, CardCode, CardName, DocDate, DocTotal, DiscPrcnt
FROM OINV
WHERE (DiscPrcnt "not equal" 0) AND (DocDate = GETDATE())
Try this query
SELECT DocNum, CardCode, CardName, DocDate, DocTotal, DiscPrcnt
FROM OINV
WHERE (DiscPrcnt != 0) AND (DateDiff(dd,DocDate,GETDATE()) = 0)
Jeyakanthan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alert is working now ??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.