Re: using load tran until_time with a variable
- From: "Rob Verschoor" <rob@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jul 2007 18:25:02 +0200
"ZeldorBlat" <zeldorblat@xxxxxxxxx> wrote in message
news:1183647699.670296.144680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 3, 5:04 pm, darkknight56 <prey...@xxxxxxxxxxxxx> wrote:
I'm running a series of tests on a new instance. Rather than edit the
script each time I run it to perform the load tran with until_time
parameter, I want to declare a variable in the procedure that gets the
date and time at a point in the script. Then later, I want to load
the transactions up to that point.
The relevant commands are:
DECLARE @char_string varchar(60)
select @char_string=convert(char(35),getdate(), 109)
load transaction mydatabase from "/dump/srvr0686/mydatabase.logdump"
with until_time = "@char_string"
The load tran command doesn't like the @char_string at the end of the
command.
Any suggestions?
Patrick Reynolds
What if you don't put quotes around it?
Then you'll get an error...
Try wrapping the entire load tran comand in execute-immediate, converting
the @char_string contents to a string first...
Rob V.
.
- Follow-Ups:
- Re: using load tran until_time with a variable
- From: darkknight56
- Re: using load tran until_time with a variable
- References:
- using load tran until_time with a variable
- From: darkknight56
- Re: using load tran until_time with a variable
- From: ZeldorBlat
- using load tran until_time with a variable
- Prev by Date: Re: generate index ddl from database
- Next by Date: Re: generate index ddl from database
- Previous by thread: Re: using load tran until_time with a variable
- Next by thread: Re: using load tran until_time with a variable
- Index(es):
Relevant Pages
|
|