Subject Problems with UpdateSQL
Author Riho-Rene Ellermaa
I made a TIB_Query that contains the UNION (I use the latest IBO).
For updating I added UpdateSQL sentences, but somehow they are not used. I include the montor log:

SELECT cast(nameuk as varchar(140) character set win1252) as name,cast (swift as varchar(11) character set win1252) as code
FROM BANK_lv
union
select name,code from for_bank
ORDER BY 1 ASC

FIELDS = [ Version 1 SQLd 2 SQLn 40
[NAME] = <NIL>
[CODE] = <NIL> ]

//PREPARE STATEMENT
INSERT INTO FOR_BANK(
CODE, /*PK*/
NAME)
VALUES (
? /* CODE */ ,
? /* NAME */ )

Here it looks like program understands to use correct INSERT

But during actual insert I get error:
............
/*---
EXECUTE STATEMENT
PARAMS = [ Version 1 SQLd 2 SQLn 2
[CODE] = '123'
[NAME] = '123' ]

INSERT COUNT: 1
PREPARE STATEMENT
SELECT cast(nameuk as varchar(140) character set win1252) as name,cast (swift as varchar(11) character set win1252) as code
FROM BANK_lv
WHERE CODE=? /* BIND_0 */
union
select name,code from for_bank


FIELDS = [ Version 1 SQLd 2 SQLn 2
[NAME] = '123'
[CODE] = '123' ]

ERRCODE = 335544569


Riho-Rene Ellermaa
senior programmer