1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Need to replace delimited string with values from another table

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 17, 2024 às 14:52.

  1. Stack

    Stack Membro Participativo

    I have two tables, and need to replace values in a pipe-delimited string with values from another table, using a single query.

    create table a( col1 Varchar2(100), col2 Varchar2(250));
    insert into a values ('EMP', '1234|5678|9123');

    create table b ( col1 Varchar2(100), col2 Varchar2(250));
    insert into b values (1234 , 'Testing1');
    insert into b values (5678, 'Values2');
    insert into b values (9123 , 'Agree1');


    I want a single query which provides output:

    Col1 Col2
    EMP Testing1|Values2|Agree1

    Continue reading...

Compartilhe esta Página