There is probably a better way to do this...but...
I am wanting to run a procedure which will backup a database. I created 7
devices, one for each day of the week.
When I run my procedure, I was wanting it to figure out the day of the week
so it would know which "device" to use for a backup.
Is there a SQL command which will allow me to determine the day of the week
rather then having to pass a parm which provides the day of the week?
Thanks in advance for your assistance...Select datename(dw,getdate())
HTH
Satish Balusa
Corillian Corp.
"Jim Heavey" <JHeavey@.nospam.com> wrote in message
news:Xns94A07D007A203JHeaveyBDUP@.207.46.248.16...
> There is probably a better way to do this...but...
> I am wanting to run a procedure which will backup a database. I created 7
> devices, one for each day of the week.
> When I run my procedure, I was wanting it to figure out the day of the
week
> so it would know which "device" to use for a backup.
> Is there a SQL command which will allow me to determine the day of the
week
> rather then having to pass a parm which provides the day of the week?
> Thanks in advance for your assistance...|||select datepart(weekday,getdate())
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Jim Heavey" <JHeavey@.nospam.com> wrote in message
news:Xns94A07D007A203JHeaveyBDUP@.207.46.248.16...
> There is probably a better way to do this...but...
> I am wanting to run a procedure which will backup a database. I created 7
> devices, one for each day of the week.
> When I run my procedure, I was wanting it to figure out the day of the
week
> so it would know which "device" to use for a backup.
> Is there a SQL command which will allow me to determine the day of the
week
> rather then having to pass a parm which provides the day of the week?
> Thanks in advance for your assistance...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment