Subject | Re: [firebird-support] Update from select |
---|---|
Author | Helen Borrie |
Post date | 2004-06-23T00:57:11Z |
At 06:43 PM 22/06/2004 +0100, you wrote:
UPDATE tt_spirit_02 t
SET t.bx_modifier_code =
(select b.bx_modifier_code
FROM bx_house_tillmod_excpt b
WHERE b.outlet_no = :l_cur_hse
AND b.bxp_code = CAST(t.item_code AS INTEGER)
AND b.till_modifier_code = CAST(t.modifier_code AS INTEGER)),
t.join_made = 'Y';
If it doesn't work then, yep, you're looking at a stored procedure or a
subquery on a view.
/heLen
>Is there any way to do this (ingres) sql in firebird? Short of an SP I can'tTry this:
>think of one.
>
> EXEC SQL UPDATE tt_spirit_02 t
> FROM bx_house_tillmod_excpt b
> SET bx_modifier_code = b.bx_modifier_code,
> join_made = 'Y'
> WHERE b.outlet_no = :l_cur_hse
> AND b.bxp_code = int4(t.item_code)
> AND b.till_modifier_code = int4(t.modifier_code);
UPDATE tt_spirit_02 t
SET t.bx_modifier_code =
(select b.bx_modifier_code
FROM bx_house_tillmod_excpt b
WHERE b.outlet_no = :l_cur_hse
AND b.bxp_code = CAST(t.item_code AS INTEGER)
AND b.till_modifier_code = CAST(t.modifier_code AS INTEGER)),
t.join_made = 'Y';
If it doesn't work then, yep, you're looking at a stored procedure or a
subquery on a view.
/heLen