Can anyone tell how to insert a string between the two another string...?

Can anyone tell how to insert a string between the two another string...?
For example: String1 = 'ABC '.
String2 = "XY".

I want that the chain of output like "AXYBC".

If you have the Position where you want to place your chain, this might work:

SQL> r
  1  declare
  2    vStr1 varchar2(20) := '123456789';
  3    vStr2 varchar2(20) := 'aa';
  4    nInsertPos number := 3;
  5    vResult varchar2(20);
  6  begin
  7    vResult := substr(vStr1, 0, nInsertPos) || vStr2 || substr(vStr1, nInsertPos+1);
  8    dbms_output.put_line(vResult);
  9* end;
123aa456789

If you want to insert it after a special character, you can search for the position of your character with the help of instr

concerning

Tags: Oracle Development

Similar Questions

Maybe you are looking for

  • How to import contacts and calendar to the iphone

    No outlook on the computer to work with the company so no outlook trying to set up email on laptop and import my contacts from my iphone. is this possible?

  • Desktop Pavilion 500: Disc startup problems

    My computer fails to start, and I have to manually select the startup disk so that it can work. I also backup problems all partitions. After running a check disk hard eroor, I get the code. u0f4q8 - 72181 g-qffv61-61vk03 Is it a hard drive failure? D

  • Should what program I use to make flyers?

    WHAT PROGRAM SHOULD I USE AND ADD PHOTOS?

  • Lower rates of e-mail response?

    One of my friends told me the other day that the "thorny point for digital marketing specialists decreases the rate of response by email '. I don't buy it. I know that we are trying to improve our response rate, but I don't see or hear from all those

  • VSAN/ha cluster network partitions and

    I wonder what will happen in a vsan/ha 4 host cluster when there is a network without a data store partition external heartbit.Let's do an example:host1 contains the virtual machine runninghost2 contains the vmdk copy1host3 contains the vmdk copy2hos