on 04-03-2009 9:34 AM
Hi Experts,
I want to set up an alert for a UDF fields in my Sales Order Title based on the date which is put. The field is expiry date and I want that before 7 days of expiry date Alert should pop up. I am using the below query but No Alert is coming which is already set in Alert Management
I also want that 2 alerts should come which is before 7 days and before 15 days of expiry date.
declare @datevar datetime
select @datevar = getdate()
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[U_LCVal], T0.[U_LCSDate], T0.[U_LCEdate] FROM ORDR T0 WHERE DATEDIFF(DD, T0.U_LCEdate, @datevar) > 7
Please guide what might be wrong.
Regards,
kamlesh
hi,
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[U_LCVal], T0.[U_LCSDate], T0.[U_LCEdate] FROM ORDR T0 WHERE DATEDIFF(DD, T0.U_LCEdate, getdate()) <= 7
OR DATEDIFF(DD, T0.U_LCEdate, getdate()) <= 15
Jeyakanthan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
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.