Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old April 4th, 2008, 03:19 PM
Newbie
 
Join Date: Apr 2008
Posts: 2
Default how to add/merge varchar2s(Strings) in PL/SQL

hi guys I need some very basic advise.

I've looked in the web but I can't find the information anywhere, but I am sure that it must be an easy task.

lets suppose i have three varchchar2

Expand|Select|Wrap|Line Numbers
  1. num Number := 2;
  2.  
  3. a varchar2 :='how do I ';
  4. b varchar2 := toChar(num);
  5. c varchar2 :' that';
  6.  
I need a third string

Expand|Select|Wrap|Line Numbers
  1. d varChar = ' how do I 2 that';
I think the conversion from string to char works quite find but how can I add char an varchar into one varchar in Java I would simply write d = a+b+c;

many thanks in advance

matthias

Last edited by eWish; April 5th, 2008 at 02:52 AM. Reason: Please use code tags
Reply
  #2  
Old April 4th, 2008, 03:26 PM
Moderator
 
Join Date: Dec 2006
Posts: 250
Default

Quote:
Originally Posted by Wildhias
hi guys I need some very basic advise.

I've looked in the web but I can't find the information anywhere, but I am sure that it must be an easy task.

lets suppose i have three varchchar2

num Number := 2;

a varchar2 :='how do I ';
b varchar2 := toChar(num);
c varchar2 :' that';

I need a third string

d varChar = ' how do I 2 that';

I think the conversion from string to char works quite find but how can I add char an varchar into one varchar in Java I would simply write d = a+b+c;

many thanks in advance

matthias
Expand|Select|Wrap|Line Numbers
  1. For concatenation use || like that
  2. d:=a || b || c
  3.  
Reply
  #3  
Old April 4th, 2008, 03:47 PM
Newbie
 
Join Date: Apr 2008
Posts: 2
Default

Thank you very much for your quick response, of course it works like that.


have a nice day!
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles