Home » SQL & PL/SQL » SQL & PL/SQL » concatenating a string and a number
concatenating a string and a number [message #38593] Mon, 29 April 2002 09:52 Go to next message
Jared
Messages: 10
Registered: June 2001
Junior Member
I want to concatenate a string and a number together and store it as a string. Something like:

'string' + 17 => 'string17'

I tried doing something like this:

new_string = 'string' || 17

But I get errors upon execution. I also tried using to_char(17), but that doesn't fix it. Any ideas?

Thanks!

Jared
Re: concatenating a string and a number [message #38595 is a reply to message #38593] Mon, 29 April 2002 10:16 Go to previous messageGo to next message
Jon
Messages: 483
Registered: May 2001
Senior Member
'string'||to_char(17)
Re: concatenating a string and a number [message #38602 is a reply to message #38593] Tue, 30 April 2002 00:01 Go to previous message
Rico
Messages: 7
Registered: April 2002
Junior Member
or this function: concat('string',to_char(17))
Previous Topic: VERY urgent please help me -Trigger
Next Topic: row name
Goto Forum:
  


Current Time: Fri Apr 26 05:30:00 CDT 2024