Re: syntax variable question

  • From: orcl <orcl@xxxxxxxxxxx>
  • Date: Wed, 19 Apr 2006 07:03:57 -0400

Thats great! -thanks  guys for the extra set of eyes.

bob

Domingo Diaz Saenz wrote:

Hi Bob,
You can try this code:
DECLARE
ranon varchar2(16);
BEGIN
select to_char(sysdate, 'YYYYMMDDHH24MISS') INTO ranon from dual;
execute immediate 'ALTER DATABASE backup CONTROLFILE to trace as '''||ranon||'.ctl''';
END;
/


Best Regards

On 4/19/06, *orcl* <orcl@xxxxxxxxxxx <mailto:orcl@xxxxxxxxxxx>> wrote:

    Hi, Im trying to get a variable passed , something is obviously  wrong
    as every combination I've tried failed.
    Any suggestions for this simple syntax ?

    set serveroutput on
    DECLARE
    ranon varchar2(14);
    BEGIN
    select to_char(sysdate, 'YYYYMMDDHH24MISS')INTO ranon from dual;
    execute immediate 'ALTER DATABASE backup CONTROLFILE to trace as
    '||ranon||'ctl';
    -- DBMS_OUTPUT.PUT_LINE(ranon);
    END;
    /

    sorry I dont post much, I lurk ;-)

    thanks!
    bob
    --
    //www.freelists.org/webpage/oracle-l
    <//www.freelists.org/webpage/oracle-l>





--
Domingo Diaz Saenz


Other related posts: