开发者

Concatenate whitespace character to field value

How can i append a whitespace character- for example   /   (开发者_如何学Pythonnon-breaking space) to a field value querying oracle server?

I tried

SELECT myfield || ' ' FROM mytable

but this is interpreted as a variable with the name #160.


Use the command

set define off

to prevent Oracle from using the & to denote a variable substitution.

Of course that just keeps it from keying off the & symbol. You could use the chr( ) function to insert a character with that binary equivalent value that you want.


simply doing

select sysdate || ' ' from dual

works for me. Does this not work for you?


You could also use the CHR function:

SELECT myfield || CHR(160) FROM mytable
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜