Re: Problems w/ SQL Insert with a static parm
From: Lennart <erik.lennart.jonsson_at_gmail.com>
Date: Sun, 01 Apr 2007 03:38:19 +0200
Message-ID: <eun2eb$vk7$1_at_registered.motzarella.org>
Date: Sun, 01 Apr 2007 03:38:19 +0200
Message-ID: <eun2eb$vk7$1_at_registered.motzarella.org>
littldo_at_gmail.com wrote:
> Hi,
>
> I need to insert a fixed parameter along with data from a query as
> part of an insert statement.
> The statement looks like this.
>
> insert into tab (a,b,c,,batch_key)
> select a, b, c
> , ? -- batch_key parm
> from x
> where x.date= current_date
>
You might have to provide typeinfo for your parameter marker. I.e if batch_key is an int
insert into tab (a,b,c,batch_key)
select a, b, c
, cast(? as int)
from x
where x.date= current_date
/Lennart
[...] Received on Sun Apr 01 2007 - 03:38:19 CEST