Convert data type type string [closed]

0

Guys I need to convert a data type date and another type varchar to string type and then both are in string type concatenate them. Can I do that in plsql ???

    
asked by Leonardo 19.06.2018 в 17:41
source

1 answer

1

Sure. No problems:

> select to_char(sysdate, 'dd/mm/yyyy') || ' un dato tipo varchar'
    from dual;

Example, if you have a table like this:

> create table a (d date, v varchar2(200);

Your query may be:

> select to_char(d, 'dd/mm/yyyy') || v
    from a;

In PL / SQL it would be as straightforward as declaring a cursor with this query, and iterating it to a varable type varchar2 .

    
answered by 19.06.2018 в 17:54