Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: exec immediate

Re: exec immediate

From: raja rao <raja4list_at_yahoo.com>
Date: Tue, 24 Jan 2006 05:45:08 -0800 (PST)
Message-ID: <20060124134508.99820.qmail@web31401.mail.mud.yahoo.com>

 

  the below did work fine:    

  declare
x varchar2(100);
  begin
execute immediate 'select hospital_id||to_char(trnx_date,'||'''||mmddyyyy||'''||')||patient_case_type from SJHS_ADT_ACT_TRXMST_BAK2 ' into x; dbms_output.put_line(x);
  end;        

  this executed successfully with teh MMDDYYYY format however, the result seems to   be strage with a single pipe:    

  The result is:    

  SJHS|09102004|ER       Actually the pipe should not be there, it should be: SJHS09102004ER    

  what couldbe the reason.

David Sharples <davidsharples_at_gmail.com> wrote:

    the semi colon goes after the final ' in the statement.    

  Plus that query is a little silly anyway  

  On 1/24/06, raja rao <raja4list_at_yahoo.com> wrote:   when the below is run i am getting the error. can someone help me :    

  begin
execute immediate ' select sysdate from dual ;' end ;                        



Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
--

http://www.freelists.org/webpage/oracle-l Received on Tue Jan 24 2006 - 07:45:08 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US