开发者

Concatenate whitespace character to field value

开发者 https://www.devze.com 2022-12-19 18:32 出处:网络
How can i append a whitespace character- for example   /   (开发者_如何学Pythonnon-breaking space) to a field value querying oracle server?

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

精彩评论

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