CREATE TABLE "TTT"."TEST"
(
   COMMENTS1 Varchar (1000) UNICODE,
   COMMENTS2 Varchar (1000) UNICODE,
   COMMENTS3 Varchar (1000) UNICODE
)
//
insert into test values (null,null,null)
//
CREATE DBPROC TTT.SetV1(IN p varchar(10)) AS
BEGIN
   TRY
       UPDATE ttt.test set COMMENTS1=:p||'1';
   CATCH
       STOP($rc, $errmsg);
END;
//
CREATE DBPROC TTT.SetV2(IN p varchar(10)) AS
BEGIN
   TRY
       UPDATE ttt.test set COMMENTS2=:p;
   CATCH
       STOP($rc, $errmsg);
END;
//
CREATE DBPROC TTT.SetV3(IN p varchar(10)) AS
BEGIN
   TRY
       UPDATE ttt.test set COMMENTS3=COMMENTS2||'1';
   CATCH
       STOP($rc, $errmsg);
END;
//
call setV1('1')
//
call setV2('1')
//
call setV3('1')
//
select ''''||comments1||'''',''''||comments2||'''',''''||comments3||'''' from test


Logically the first field should has value '11', the second '1' and the third '11'. But the first field is '1 1'.

Should I always perform trim before concatination for local variables and DBPROC parameters? Or this semantic will be changed?


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to