Re: Shipping the most current scheduled job logs
From: Uri Dimant (urid_at_iscar.co.il)
Date: 08/10/04
- Next message: Gert E.R. Drapers: "Re: How can I pass an "SRV_PROC *" from native C++ to an MC++ function?"
- Previous message: Uri Dimant: "Re: Shipping the most current scheduled job logs"
- In reply to: bjgriswold: "Shipping the most current scheduled job logs"
- Next in thread: bjgriswold: "Re: Shipping the most current scheduled job logs"
- Reply: bjgriswold: "Re: Shipping the most current scheduled job logs"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 10:43:42 +0200
Perhaps
DECLARE @filename VARCHAR (100)
DECLARE @dt CHAR(8)
SELECT @dt=CONVERT(CHAR(8),GETDATE(),112)
SET @filename='MyFie_200408100130'
IF PATINDEX('%'+@dt+'%',@filename)>0
PRINT 'Exists'
ELSE
PRINT 'Does not'
"bjgriswold" <grizgirrl@hotmail.com> wrote in message
news:f46e4f05.0408091639.1af71cfb@posting.google.com...
> Forgive the newbie programmer.
>
> I am assisting someone else with a project to automate their
> notifications (sans notification services, which seems like overkill).
> Specifically, the manager wants the day's logs (backup logs, etc., not
> tran logs) emailed to him on a nightly basis. Since SQL Mail doesn't
> really work well in a clustered environment, I have already
> implemented another SMTP solution which works great.
>
> All jobs were created using maintenance plans. The manager likes to
> keep 90 days of logs, so I must build some logic into the job,
> locating only the current day's logs.
>
> Of course the logs use ISO dates at the end (filename_200408040130).
> Seems like this should be relatively straightforward, using getdate()
> as a variable (perhaps comparing getdate against the ISO dates on the
> end of the filenames).
>
> Any ideas are greatly appreciated.
>
> TIA,
>
> Grizgirrl
- Next message: Gert E.R. Drapers: "Re: How can I pass an "SRV_PROC *" from native C++ to an MC++ function?"
- Previous message: Uri Dimant: "Re: Shipping the most current scheduled job logs"
- In reply to: bjgriswold: "Shipping the most current scheduled job logs"
- Next in thread: bjgriswold: "Re: Shipping the most current scheduled job logs"
- Reply: bjgriswold: "Re: Shipping the most current scheduled job logs"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|