I am trying to concatenate strings in oracle.
The following is my query:
insert into dummy values('c'||to_char(10000,'99999'));
The expected result is:
c10000
But the output I get is with a space in between 'c' and the value 10000:
c 10000
How to concat without spaces?
This is not an issue with the concatenation operator but with the function to_char()
. Try instead:
to_char(10000,'FM99999')
I quote the manual here:
FM .. Returns a value with no leading or trailing blanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With