开发者

String concatenation within INFORMIX-SQL "Perform" screens

How can I concatenate two char columns within a perform screen?

example:

table sample

col1 char(1), col2 char(1)

. .

after editadd of sample

let label_3 = sample.col1 + sample.col2

.. this didn't work, I even tried开发者_开发知识库 using subscripts for the 2 cols but no dice!


There isn't a simple way to do it. Your closest approach would be a custom C function to do the concatenation:

LET label_3 = CONCATENATE(sample.col1, sample.col2)

That, of course, relies on you having a custom Perform runner with a concatenate function added to it.

Perform pre-dates the addition of the '||' string concatenation operator into SQL and does not support it.

The alternative is to use an Informix 4GL (I4GL) program instead. You can do a lot of things in I4GL that you cannot do in ISQL - at the cost of writing the code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜