how to add/merge varchar2s(Strings) in PL/SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wildhias
    New Member
    • Apr 2008
    • 2

    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

    Code:
    num Number := 2;
    
    a varchar2 :='how do I ';
    b varchar2 := toChar(num);
    c varchar2 :' that';
    I need a third string

    Code:
    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; Apr 5 '08, 01:52 AM. Reason: Please use code tags
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    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
    Code:
    For concatenation use || like that
    d:=a || b || c

    Comment

    • Wildhias
      New Member
      • Apr 2008
      • 2

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


      have a nice day!

      Comment

      Working...