PLS-00103: Encountered the symbol ""

Hi
I'm trying to create a PL/SQL function using JDBC and the procedure gets created but with status invalid. After checking the user_errors view I get:
PLS-00103: Encountered the symbol "" when expecting one of the following: begin function package pragma procedure subtype type use form current cursor external language
I'm using the following statement:
statement = connection.prepareStatement ("CREATE OR REPLACE FUNCTION SCOTT.WHATEVER return varchar2 as begin return ('Whatever 2'); end;");
statement.execute ();
If I run the same statement from SQL*Plus I get no problems.
Yes!, the application requires that I create store procedures using JDBC, no other way.
Any ideas?
Regards,
Néstor Boscán

Nestor,
Works for me on Oracle 9.2.0.7 database (running on SUN [sparc] Solaris 9) with JDK 1.4.2_07 and "ojdbc14.jar" JDBC [thin] driver.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class CrSqlFun {
  public static void main(String[] args) {
    Connection c = null;
    PreparedStatement ps = null;
    String url = "jdbc:oracle:thin:scott/tiger@host:1521:orcl";
    String sql = "create or replace function WHATEVER return varchar2 as " +
                                             "begin return 'Whatever 2'; end;";
    try {
      Class.forName("oracle.jdbc.driver.OracleDriver");
      c = DriverManager.getConnection(url);
      ps = c.prepareStatement(sql);
      ps.executeUpdate();
    catch (Exception x) {
      x.printStackTrace(System.err);
    finally {
      if (ps != null) {
        try {
          ps.close();
        catch (SQLException sx) {
          System.out.println("Failed to close statement.");
      if (c != null) {
        try {
          c.close();
        catch (SQLException sx) {
          System.out.println("Failed to close connection.");
}Good Luck,
Avi.

Similar Messages

  • PLS-00103: Encountered the symbol "SELECT" when expecting one of the follow

    Can any one tell me why I an getting compile error in Trigger with the following code (see below for the error message). Error is indicated in the IF statement Select clause.
    Code:
    -- AUdit Code Begin
    -- Note: Ony for those tables having 'AUDIT' UDP
    -- Value set to 'T'
    IF (Select Count(*) From DBConfiguration
    Where ConfigurationCode = 'AUDIT' AND
    ConfigurationValue = 'T') > 0 THEN
    WHEN (:new.WORKREQUESTSTATUS <> :old.WORKREQUESTSTATUS)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSTATUS',
    :old.WORKREQUESTSTATUS,:new.WORKREQUESTSTATUS,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTSOURCE <> :old.WORKREQUESTSOURCE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCE',
    :old.WORKREQUESTSOURCE,:new.WORKREQUESTSOURCE,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTSOURCEID <> :old.WORKREQUESTSOURCEID)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCEID',
    :old.WORKREQUESTSOURCEID,:new.WORKREQUESTSOURCEID,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTDESC <> :old.WORKREQUESTDESC)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDESC',
    :old.WORKREQUESTDESC,:new.WORKREQUESTDESC,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTDATE <> :old.WORKREQUESTDATE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDATE',
    CAST(:old.WORKREQUESTDATE AS varchar2(256)),CAST(:new.WORKREQUESTDATE AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.WORKREQUESTOWNER <> :old.WORKREQUESTOWNER)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTOWNER',
    :old.WORKREQUESTOWNER,:new.WORKREQUESTOWNER,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTAPPCODE <> :old.WORKREQUESTAPPCODE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPCODE',
    :old.WORKREQUESTAPPCODE,:new.WORKREQUESTAPPCODE,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTAPPROVER <> :old.WORKREQUESTAPPROVER)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPROVER',
    :old.WORKREQUESTAPPROVER,:new.WORKREQUESTAPPROVER,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTAPPDATE <> :old.WORKREQUESTAPPDATE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPDATE',
    CAST(:old.WORKREQUESTAPPDATE AS varchar2(256)),CAST(:new.WORKREQUESTAPPDATE AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.WORKREQUESTCOMMENT <> :old.WORKREQUESTCOMMENT)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTCOMMENT',
    :old.WORKREQUESTCOMMENT,:new.WORKREQUESTCOMMENT,:new.UserId)
    End;
    WHEN (:new.CLOSEDATE <> :old.CLOSEDATE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'CLOSEDATE',
    CAST(:old.CLOSEDATE AS varchar2(256)),CAST(:new.CLOSEDATE AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.ANALYTEKEY <> :old.ANALYTEKEY)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'ANALYTEKEY',
    CAST(:old.ANALYTEKEY AS varchar2(256)),CAST(:new.ANALYTEKEY AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.SUBPURPOSEKEY <> :old.SUBPURPOSEKEY)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'SUBPURPOSEKEY',
    CAST(:old.SUBPURPOSEKEY AS varchar2(256)),CAST(:new.SUBPURPOSEKEY AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.PURPOSEKEY <> :old.PURPOSEKEY)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'PURPOSEKEY',
    CAST(:old.PURPOSEKEY AS varchar2(256)),CAST(:new.PURPOSEKEY AS varchar2(256)),:new.UserId)
    End;
    End if;
    -- Audit End
    Error:
    95/5 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternativ
    97/39 PLS-00103: Encountered the symbol ")" when expecting one of the following:
    * & - + ; / at for mod remainder rem <an exponent (**)> and
    or group having intersect minus order start union where
    connect || multiset

    Here is the code:
    -- AUdit Code Begin
    -- Note: Ony for those tables having 'AUDIT' UDP
    -- Value set to 'T'
    IF (Select Count(DBConfigurationValue) From DBConfiguration
    Where DBConfigurationCode = 'AUDIT' AND
    DBConfigurationValue = 'T') > 0 THEN
    WHEN (:new.WORKREQUESTSTATUS <> :old.WORKREQUESTSTATUS)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSTATUS',
    :old.WORKREQUESTSTATUS,:new.WORKREQUESTSTATUS,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTSOURCE <> :old.WORKREQUESTSOURCE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCE',
    :old.WORKREQUESTSOURCE,:new.WORKREQUESTSOURCE,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTSOURCEID <> :old.WORKREQUESTSOURCEID)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTSOURCEID',
    :old.WORKREQUESTSOURCEID,:new.WORKREQUESTSOURCEID,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTDESC <> :old.WORKREQUESTDESC)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDESC',
    :old.WORKREQUESTDESC,:new.WORKREQUESTDESC,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTDATE <> :old.WORKREQUESTDATE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTDATE',
    CAST(:old.WORKREQUESTDATE AS varchar2(256)),CAST(:new.WORKREQUESTDATE AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.WORKREQUESTOWNER <> :old.WORKREQUESTOWNER)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTOWNER',
    :old.WORKREQUESTOWNER,:new.WORKREQUESTOWNER,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTAPPCODE <> :old.WORKREQUESTAPPCODE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPCODE',
    :old.WORKREQUESTAPPCODE,:new.WORKREQUESTAPPCODE,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTAPPROVER <> :old.WORKREQUESTAPPROVER)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPROVER',
    :old.WORKREQUESTAPPROVER,:new.WORKREQUESTAPPROVER,:new.UserId)
    End;
    WHEN (:new.WORKREQUESTAPPDATE <> :old.WORKREQUESTAPPDATE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTAPPDATE',
    CAST(:old.WORKREQUESTAPPDATE AS varchar2(256)),CAST(:new.WORKREQUESTAPPDATE AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.WORKREQUESTCOMMENT <> :old.WORKREQUESTCOMMENT)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'WORKREQUESTCOMMENT',
    :old.WORKREQUESTCOMMENT,:new.WORKREQUESTCOMMENT,:new.UserId)
    End;
    WHEN (:new.CLOSEDATE <> :old.CLOSEDATE)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'CLOSEDATE',
    CAST(:old.CLOSEDATE AS varchar2(256)),CAST(:new.CLOSEDATE AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.ANALYTEKEY <> :old.ANALYTEKEY)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'ANALYTEKEY',
    CAST(:old.ANALYTEKEY AS varchar2(256)),CAST(:new.ANALYTEKEY AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.SUBPURPOSEKEY <> :old.SUBPURPOSEKEY)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'SUBPURPOSEKEY',
    CAST(:old.SUBPURPOSEKEY AS varchar2(256)),CAST(:new.SUBPURPOSEKEY AS varchar2(256)),:new.UserId)
    End;
    WHEN (:new.PURPOSEKEY <> :old.PURPOSEKEY)
    Begin
    Insert INTO ADAMChangeAudit (ADAMChangeAuditKey,AuditTable,AuditRecordKey,AuditColumnName,AuditOldValue,AuditNewValue,AuditUser)
    VALUES(ADAMChangeAuditKey.NextValue,'WORKREQUEST',:new.WORKREQUESTKEY,'PURPOSEKEY',
    CAST(:old.PURPOSEKEY AS varchar2(256)),CAST(:new.PURPOSEKEY AS varchar2(256)),:new.UserId)
    End;
    End if;

  • PLS-00103: Encountered the symbol "" when expecting one of the following:

    Hi I am creating trigger using CFQUERY tag of cold fusion on oracle..
    <CFQUERY DATASOURCE="CRM">
    create or replace trigger AWC_ACCESSROLESID_TRI
    before insert on AWC_ACCESSROLES
    for each row
    begin
    select AWC_ACCESSROLESID_SEQ.nextval into :new.AR_ID from dual;
    end;
    </CFQUERY>
    But the created trigger is not compiled, it is giving the following error
    "Line # = 1 Column # = 6 Error Text = PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge <a single-quoted SQL string> pipe The symbol "" was ignored."
    If I edit that trigger in enterprose manager console by pressing space and compile that, it is working fine with out any error. If i run the above statement in sql *plus, It is working fine with out any error.
    Can you please tell me why this is happening if i run it using cfquery tag and also the possible solutions.
    Thanks in advance,
    Vinod

    So it works in Enterprise manager. It works in SQL*Plus. It doesn't work in CFQUERY. Sounds to me like a ColdFusion problem rather than an Oracle problem to be honest. Aren't there any ColdFusion support resources?
    Cheers, APC

  • ORA-06550: line 5, column 57: PLS-00103: Encountered the symbol "F01_" when

    Hello,
    I wanted to use the APEX_ITEM.DISPLAY_AND_SAVE
    Here is my query:
    DECLARE
    QUERY VARCHAR2 (2000);
    BEGIN
    QUERY := 'SELECT '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(1,REGISTRATION_ID,'f01_'||ROWNUM, NULL) REGISTRATION_ID, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(2,STATUS,'f02_'||ROWNUM, NULL) STATUS, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(3,CALL_CODE,'f03_'||ROWNUM, NULL) CALL_CODE, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(4,PARTNER_USER_ID,'f04_'||ROWNUM, NULL) PARTNER_USER_ID,'
    ||'APEX_ITEM.DISPLAY_AND_SAVE(5,COORDINATOR_USER_ID,'f05_'||ROWNUM, NULL) COORDINATOR_USER_ID, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(6,COORDINATOR_EMAIL,'f06_'||ROWNUM, NULL) COORDINATOR_EMAIL, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(7,COORDINATOR_FINAUTH_EMAIL,'f07_'||ROWNUM, NULL) COORDINATOR_FINAUTH_EMAIL,'
    ||'APEX_ITEM.DISPLAY_AND_SAVE(8,COORDINATOR_FULL_ADDRESS,'f08_'||ROWNUM, NULL) COORDINATOR_FULL_ADDRESS, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(9,COORDINATOR_NAME,'f09_'||ROWNUM, NULL) COORDINATOR_NAME, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(10,COORDINATOR_FAX,'f10_'||ROWNUM, NULL) COORDINATOR_FAX,'
    ||'APEX_ITEM.DISPLAY_AND_SAVE(11,COORDINATOR_TEL,'f11_'||ROWNUM, NULL) COORDINATOR_TEL, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(12,COORDINATOR_COUNTRY,'f12_'||ROWNUM, NULL) COORDINATOR_COUNTRY, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(13,COORDINATOR_COMPANY_NAME,'f13_'||ROWNUM, NULL) COORDINATOR_COMPANY_NAME,'
    ||'APEX_ITEM.DISPLAY_AND_SAVE(14,DATE_LETTER_SENT,'f14_'||ROWNUM, NULL) DATE_LETTER_SENT, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(15,DATE_LAST_SUBMISSION,'f15_'||ROWNUM, NULL) DATE_LAST_SUBMISSION, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(16,PROPOSAL_ACRONYM,'f16_'||ROWNUM, NULL) PROPOSAL_ACRONYM,'
    ||'APEX_ITEM.DISPLAY_AND_SAVE(17,INSTRUMENT_CODE,'f17_'||ROWNUM, NULL) INSTRUMENT_CODE, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(18,TITLE,'f18_'||ROWNUM, NULL) TITLE, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(19,SUBMITTED,'f19_'||ROWNUM, NULL) SUBMITTED, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(20,PREPARATION,'f20_'||ROWNUM, NULL) PREPARATION, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(21,PASS_BY_MAIL,'f21_'||ROWNUM, NULL) PASS_BY_MAIL,'
    ||'APEX_ITEM.DISPLAY_AND_SAVE(22,PROPOSAL_ID,'f22_'||ROWNUM, NULL) PROPOSAL_ID, '
    ||'APEX_ITEM.DISPLAY_AND_SAVE(23,PROPOSAL_NUMBER,'f23_'||ROWNUM, NULL) PROPOSAL_NUMBER '
    ||' FROM SUZANREGISTRATIONVIEW '
    ||' where 1 = 1 ';
    IF LENGTH (V ('P4_REGISTRATION_ID')) > 0
    THEN
    QUERY :=
    QUERY || ' and REGISTRATION_ID like ' || V ('P4_REGISTRATION_ID');
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_CALL_CODE')) > 0
    THEN
    QUERY := QUERY || ' and CALL_CODE like ''' || V ('P4_CALL_CODE') || '''';
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_COORDINATOR_USER_ID')) > 0
    THEN
    QUERY :=
    QUERY
    || ' and (upper(COORDINATOR_USER_ID)) like (upper('''
    || V ('P4_COORDINATOR_USER_ID')
    || '''))';
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_COORDINATOR_FINAUTH_EMAIL')) > 0
    THEN
    QUERY :=
    QUERY
    || ' and (upper(R.COORDINATOR_EMAIL)) like (upper('''
    || V ('P4_COORDINATOR_FINAUTH_EMAIL')
    || '''))';
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_COORDINATOR_NAME')) > 0
    THEN
    QUERY :=
    QUERY
    || ' and upper(COORDINATOR_NAME) like (upper('''
    || V ('P4_COORDINATOR_NAME')
    || '''))';
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_COORDINATOR_COMPANY_NAME')) > 0
    THEN
    QUERY :=
    QUERY
    || ' and (upper(COORDINATOR_COMPANY_NAME)) like (upper('''
    || V ('P4_COORDINATOR_COMPANY_NAME')
    || '''))';
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_PARTNER_USER_ID')) > 0
    THEN
    QUERY :=
    QUERY
    || ' and (upper(PARTNER_USER_ID)) like (upper('''
    || V ('P4_PARTNER_USER_ID')
    || '''))';
    ELSE
    QUERY := QUERY || '';
    END IF;
    IF LENGTH (V ('P4_PROPOSAL_ACRONYM')) > 0
    THEN
    QUERY :=
    QUERY
    || ' and (upper(proposal_acronym)) like (upper('''
    || V ('P4_PROPOSAL_ACRONYM')
    || '''))';
    ELSE
    QUERY := QUERY || '';
    END IF;
    RETURN QUERY;
    END;
    And here is the error encountered:
    1 error has occurred
    * Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
    (ORA-06550: line 5, column 57: PLS-00103: Encountered the symbol "F01_" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || member SUBMULTISET_)
    I don't understand why the engine returns an error at that point.
    Despite the fact that I follow the user guide and the Denes Kubicek's sample examples, I still have that error.
    If I remove the part 'f01_' || and only keep the rownum, the problem is solved.
    Do you have any idea ?
    Thanks in advance for your answers.
    Regards,
    Stessy Delcroix

    HI MickyWay,
    So simple. :-)
    Problem solved.
    Thanks a lot (merci beaucoup)

  • PLS-00103: Encountered the symbol "end-of-file" when expecting one of the f

    I'm trying to follow an example pl/sql program to select from one table and insert into a second table in a LOOP.
    I get a syntax error which I can't figure out
    Line # = 67 Column # = 0 Error Text = PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted delimited-identifier>
    <a bind variable> << close current delete fetch lock insert
    open rollback savepoint set sql execute commit forall merge
    pipe
    What is the cause?
    IS
    BEGIN
    declare
    v_pk1 bb_bb60_stats.pk1%TYPE;
    v_event_type bb_bb60_stats.event_type%TYPE;
    v_user_pk1 bb_bb60_stats.user_pk1%TYPE;
    v_course_pk1 bb_bb60_stats.course_pk1%TYPE;
    v_group_pk1 bb_bb60_stats.group_pk1%TYPE;
    v_forum_pk1 bb_bb60_stats.forum_pk1%TYPE;
    v_internal_handle bb_bb60_stats.internal_handle%TYPE;
    v_content_pk1 bb_bb60_stats.content_pk1%TYPE;
    v_data bb_bb60_stats.data%TYPE;
    v_timestamp bb_bb60_stats.timestamp%TYPE;
    v_status bb_bb60_stats.status%TYPE;
    v_session_id bb_bb60_stats.session_id%TYPE;
    v_messages bb_bb60_stats.messages%TYPE;
    INSERT_COUNT NUMBER := 1;
    CURSOR curs_aa
    IS
    SELECT * from bb_bb60_stats.activity_accumulator ;
    BEGIN
    OPEN curs_aa;
    LOOP
    FETCH curs_aa into
    v_pk1,
    v_event_type,
    v_user_pk1 ,
    v_course_pk1,
    v_group_pk1,
    v_forum_pk1,
    v_internal_handle,
    v_content_pk1 ,
    v_data,
    v_timestamp ,
    v_status ,
    v_session_id ,
    v_messages;
    INSERT INTO csuh_custom.aa_partitioned
    VALUES
    v_pk1,
    v_event_type,
    v_user_pk1 ,
    v_course_pk1,
    v_group_pk1,
    v_forum_pk1,
    v_internal_handle,
    v_content_pk1,
    v_data,
    v_timestamp,
    v_status,
    v_session_id,
    v_messages
    -- commit after every 100 inserts to avoid large rollback segments
    IF INSERT_COUNT = 25000 THEN
    COMMIT;
    INSERT_COUNT := 1;
    ELSE
    INSERT_COUNT := INSERT_COUNT + 1;
    END IF;
    END LOOP;
    CLOSE curs_aa;

    When I add the END;
    I get
    Line # = 66 Column # = 0 Error Text = PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted delimited-identifier>
    <a bind variable> << close current delete fetch lock insert
    open rollback savepoint set sql execute commit forall merge
    pipe

  • 11g R1 problem... PLS-00103: Encountered the symbol "¿" when expecting...

    Yesterday AM. my customer went live with an upgrade. Things started out ok, but as the load on the system started to build, we started seeing errors.
    The reported error is:
    S1000 Oracle ODBC Ora ORA-06550: line 1, column 42:
    PLS-00103: Encountered the symbol "¿" when expecting one of the following:
    . ( ) , * @ % & = - + < / > at in is mod remainder not rem =>
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    This is in response to calling a stored procedure with this signature.
    MY_THING (
    p1 IN NUMBER,
    p2 OUT NUMBER,
    p2 IN NUMBER
    I believe this is a failure with the ODBC driver to parse
    {call MY_STUFF.MY_THING(791200, ?, 1067744)}
    Now to head off the obvious responses, I'm going to say these things in boldface
    the procedure itself is fine, and works flawlessly under test
    *nowhere in any of the code is an upside-down '?' as reported in the error message*
    Has anyone else encountered this--or better yet solved it?

    thanks for the replies.
    I'd have to rule out triggers at the point the stored procedure is run. Other than logging, it doesn't do any writes to the database. It does a couple of look-ups, and returns the results in a cursor. As for the web servers, they're pretty much copies of each other. 'Out of the box + updates' Windows Server 2008 machines with our application installed on each.
    The software issuing the ODBC call is old, well worn, tried and true C++. In this case the only string parameters passed are 'PA' or 'PJ' the rest is all integers.
    But again I want to stress that it doesn't appear that we reach the database when it fails. It appears to fail when the ODBC driver is parsing the '{call xxxxxx} statement.
    On a hunch, I've just reconfigured our application to treat the offensive call as if it were an 'external' reference. Meaning that a new ODBC connection will be created/destroyed for each run. Not very efficient, but I'll take slow over broken any day. It's too early to tell if this will eliminate the error.

  • Encountered an error "PLS-00103: Encountered the symbol "CREATE" when expec

    HI All,
    I am creating a procedure and trying to use temp table...
    Here is the code":
    PROCEDURE P_PARENT_TREE
    topic_id_in           IN NUMBER,
    topic_hierarchy_details_out     OUT SYS_REFCURSOR
    ) IS
    temp_children_level topic_children.children_level%TYPE;
    temp_children_id topic_children.children_id%TYPE;
    temp_topic_id topic.topic_id%TYPE;
    CURSOR c_child_level IS
    SELECT children_level, children_id
    FROM topic_children
    WHERE children_id = topic_id_in;
    BEGIN
    OPEN c_child_level;
    FETCH c_child_level INTO temp_children_level,temp_topic_id ;
    CLOSE c_child_level;
    CREATE TEMPORARY TABLE IF NOT EXISTS topic_child
    (t_topic_id NUMBER, t_children_id NUMBER, children_seq NUMBER);
    WHILE temp_children_level > 0
    LOOP
    INSERT INTO topic_child(t_topic_id,t_children_id,children_seq)
    values (
    SELECT topic_id , children_id ,children_level
    FROM topic_children
    WHERE children_id = temp_topic_id);
    temp_children_level := temp_children_level - 1;
    END LOOP;
    OPEN topic_hierarchy_details_out FOR
    select * from topic_child;
    END P_PARENT_TREE;
    END TOPIC_PKG;
    getting the error "PLS-00103: Encountered the symbol "CREATE" when expec"...
    any idea why? or may be is there any other way to write this query

    something like
    select connect_by_root child_topic ||sys_connect_by_path (topic, '>') path
      from test
    where connect_by_isleaf = 1
    start with child_topic = 'aa4'
    connect by child_topic = prior topicas in
    SQL> with test as
      2  (
      3  select 0 sq, 'aa ' topic, 'aa1' child_topic from dual union all
      4  select 1 sq, 'aa1' topic, 'aa2' child_topic from dual union all
      5  select 3 sq, 'aa2' topic, 'aa3' child_topic from dual union all
      6  select 4 sq, 'aa3' topic, 'aa4' child_topic from dual
      7  )
      8  select connect_by_root child_topic ||sys_connect_by_path (topic, '>') path
      9    from test
    10   where connect_by_isleaf = 1
    11   start with child_topic = 'aa4'
    12  connect by child_topic = prior topic
    13  /
    PATH
    aa4>aa3>aa2>aa1>aa

  • Encountered the symbol "COLLECT" error message, without a collection?

    Okay, once again I'm confused and lost.
    I'm working on a 'variation' of the Issue Tracker sample application at:
    http://apex.oracle.com/pls/otn/f?p=23133
    Once there, select "Projects", then on the "Projects" page, click the edit button.
    The error appears in the "Add or Edit Project Tasks" region.
    The region source is:
    select
    x.del,
    x.task_name,
    x.status,
    x.dependent_upon,
    x.task_scope,
    x.task_comments,
    x.task_lead,
    x.ck ck
    from (
    select
    apex_item.checkbox(1,task_id) del,
    apex_item.text(2,task_name,30,70) TASK_NAME,
    apex_item.display_and_save(3,ht_tasks_getstatus(task_id)) STATUS,
    apex_item.select_list_from_lov(4,dependent_upon,'select task_name d, task_id r from ht_tasks where project_id = :P3_PROJECT_ID') DEPENDENT_UPON,
    apex_item.textarea(5,task_scope,4,40) TASK_SCOPE,
    apex_item.textarea(6,task_comments,4,40) TASK_COMMENTS,
    apex_item.select_list_from_lov(7,task_lead,'PEOPLE') TASK_LEAD,
    apex_item.hidden(8,project_id)||
    apex_item.hidden(9,wwv_flow_item.md5(task_name,status,dependent_upon,task_scope,task_comments,task_lead)) ck
    from HT_TASKS_VIEW
    where project_id = :P3_PROJECT_ID
    union all
    select
    apex_item.checkbox(1,null) del,
    apex_item.text(2,null,30,70) TASK_NAME,
    apex_item.display_and_save(3,null) STATUS,
    apex_item.select_list_from_lov(4,null,'select task_name d, task_id r from ht_tasks where project_id = :P3_PROJECT_ID') DEPENDENT_UPON,
    apex_item.textarea(5,null,4,40) TASK_SCOPE,
    apex_item.textarea(6,null,4,40) TASK_COMMENTS,
    apex_item.select_list_from_lov(7,null,'PEOPLE') TASK_LEAD,
    apex_item.hidden(8,to_number(:P3_PROJECT_ID))||
    apex_item.hidden(9,null) ck
    from dual) x
    Which appears to be working correctly. When I click the debug link, the following appears:
    0.04: add row query: select x.del, x.task_name, x.status, x.dependent_upon, x.task_scope, x.task_comments, x.task_lead, x.ck ck from ( select apex_item.checkbox(1,task_id) del, apex_item.text(2,task_name,30,70) TASK_NAME, apex_item.display_and_save(3,ht_tasks_getstatus(task_id)) STATUS, apex_item.select_list_from_lov(4,dependent_upon,'select task_name d, task_id r from ht_tasks where project_id = :P3_PROJECT_ID') DEPENDENT_UPON, apex_item.textarea(5,task_scope,4,40) TASK_SCOPE, apex_item.textarea(6,task_comments,4,40) TASK_COMMENTS, apex_item.select_list_from_lov(7,task_lead,'PEOPLE') TASK_LEAD, apex_item.hidden(8,project_id)|| apex_item.hidden(9,wwv_flow_item.md5(task_name,status,dependent_upon,task_scope,task_comments,task_lead)) ck from HT_TASKS_VIEW where project_id = :P3_PROJECT_ID union all select apex_item.checkbox(1,null) del, apex_item.text(2,null,30,70) TASK_NAME, apex_item.display_and_save(3,null) STATUS, apex_item.select_list_from_lov(4,null,'select task_name d, task_id r from ht_tasks where project_id = :P3_PROJECT_ID') DEPENDENT_UPON, apex_item.textarea(5,null,4,40) TASK_SCOPE, apex_item.textarea(6,null,4,40) TASK_COMMENTS, apex_item.select_list_from_lov(7,null,'PEOPLE') TASK_LEAD, apex_item.hidden(8,to_number(:P3_PROJECT_ID))|| apex_item.hidden(9,null) ck from dual) x
    0.04: determine column headings
    0.04: parse query as: ARIA
    0.04: binding: ":P3_PROJECT_ID"="P3_PROJECT_ID" value="1"
    0.04: print column headings
    0.04: rows loop: 15 row(s)
    report error:
    ORA-06550: line 1, column 13:
    PLS-00103: Encountered the symbol "COLLECT" when expecting one of the following:
    := . ( @ % ;
    So, it looks like the error is happening when it starts the loop to grab the rows. I'm not using a collection, so I'm assuming that for the pagination, Apex is using a collection internally, and somehow, somewhere, that's generating the error?
    I've deleted the region and everything associated with it, buttons, processes, etc. and the rebuilt the region without the other 'stuff', but I still get the error. I'm completely lost now, as I really don't what else to try, other than dropping the page an trying to recreate it. But if that doesn't work, any idea what would?
    Also, to log in and see the code, my workspace is wbfergus, and the id and pwd are both htmldb.
    Thanks.
    Bill Ferguson

    Bill - Try apex_item.select_list_from_query when a query (not a named lov) is the source:  apex_item.select_list_from_query(4,dependent_upon,'select task_name d, task_id r from ht_tasks where project_id = :P3_PROJECT_ID') DEPENDENT_UPON,BTW, nothing do do with collections in this case. The parsing hit a 'bulk collect' probably.
    Scott

  • Getting Errors in PL/SQL - bad bind variable and encountered the symbol...

    CREATE OR REPLACE TRIGGER update_QOH
    AFTER INSERT ON ORDERLINE
    FOR EACH ROW
    DECLARE
         QOH_PRODUCT PRODUCT.QOH%TYPE;
    BEGIN
         SELECT QOH INTO QOH_PRODUCT FROM PRODUCT WHERE :old.product_no = :new.product_no;
         IF :new.QTY <= :old.QOH THEN
              QOH = :old.QOH - :new.QTY
         ELSE
              send_email(ord_no, 'Backorder');
              INSERT INTO BACKORDER (backorder_no_seq.NEXTVAL, :new.product_no, :new.qty, SYSDATE);
              INSERT INTO PRODVENDOR (po_no_seq.NEXTVAL, :new.vendor_no, :new.product_no, :new.vend_qty, :new.shipping_method, SYSDATE, NULL, NULL, NULL);
         END IF;
    END;
    Error(5,17): PLS-00049: bad bind variable 'OLD.QOH'
    Error(6,7): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ;
    Error(6,9): PLS-00049: bad bind variable 'OLD.QOH'

    Hi,
    Welcome to the forum!
    I see 4 mistakes:
    851543 wrote:
    CREATE OR REPLACE TRIGGER update_QOH
    AFTER INSERT ON ORDERLINE
    FOR EACH ROW
    DECLARE
         QOH_PRODUCT PRODUCT.QOH%TYPE;
    BEGIN
         SELECT QOH INTO QOH_PRODUCT FROM PRODUCT WHERE :old.product_no = :new.product_no;
         IF :new.QTY <= :old.QOH THEN
              QOH = :old.QOH - :new.QTY(1) The variable qoh isn't declared.
    (2) Did you mean the assignment operator, :=, rather than the equality operator, = ?
    (3) An assignment statement must end with a semi-colon.
         ELSE
              send_email(ord_no, 'Backorder');(4) The variable ord_no isn't declared.
              INSERT INTO BACKORDER (backorder_no_seq.NEXTVAL, :new.product_no, :new.qty, SYSDATE);
              INSERT INTO PRODVENDOR (po_no_seq.NEXTVAL, :new.vendor_no, :new.product_no, :new.vend_qty, :new.shipping_method, SYSDATE, NULL, NULL, NULL);
         END IF;
    END;
    /While you can reference :NEW and :OLD values in the trigger, it doesn't make any sense to reference the :OLD values. On an INSERT (which is the only time this trigger fires), all :OLD values are NULL.
    >
    Error(5,17): PLS-00049: bad bind variable 'OLD.QOH'
    Error(6,7): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ;
    Error(6,9): PLS-00049: bad bind variable 'OLD.QOH'I don't believe the code you posted is causing these errors. Each of the errors mentioned above would cause a different message. Post the actual code and error messages.
    Whenever you post a question, post all the code necessary for people to re-create the problem and test their ideas.
    In this case, that means CREATE statements for any tables or sequences involved, INSERT statements for any tables that need rows (such as product) as they exist before the INSERT, some INSERT statements for orderline, and the contents of all the tables after each of those INSERTs.
    Always say which version of Oracle you're using.

  • ODI 11g  (odi 11.1.1.3)  procedure failed -  Encountered the symbol "," ...

    Hi All,
    I am facing problem while calling PL/SQL procedure from ODI procedure:
    ODI Console show below error code on failure of procedure:
    =======================================================================
    ODI-1228: Task PR_RETRIVE_DATA (Procedure) fails on the target ORACLE connection SES_DW.
    Caused By: java.sql.SQLException: ORA-06550: line 1, column 30:
    PLS-00103: Encountered the symbol "," when expecting one of the following:
    ( ) - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    table continue avg count current exists max min prior sql
    stddev sum variance execute multiset the both leading
    trailing forall merge year month day hour minute second
    timezone_hour timezone_minute timezone_region timezone_abbr
    time timestamp interval date
    <a string literal with character set specification>
    ================================================
    Thanks,
    Dharmaraj

    Hi,
    it seems there are compilation errors in your PL/SQL, leading to the ORA-06550 error. Check your PL/SQL code and try to execute it directly in the database to see if the issue is related to ODI.
    Regards,
    Alex

  • Expression Builder - Anydata Cast Error - Encountered the symbol "("

    Hello
    I am using OWB 11 with Oracle 11 and am hitting an error on something I would think is super simple in expression builder!
    So I been reading around the forums and havent been able to figure out what is going on with my transformation
    I drag and dropped the transformation "Anydata Cast" onto my mapping
    I select the target type as "VARCHAR" for casting
    I drag and drop the source column and drop it over the auto generated "CAST_SOURCE" from INGRP1
    I then drag CAST_TARGET from the OUTGRP1 to my target
    I right click the ANYDATA_CAST transformation and click on "Output Attributes" and click on the "..." to open the expression builder
    Then I input the following code
    CAST( INGRP1.CAST_SOURCE AS VARCHAR(10))
    And hit validate
    I then hit the following error
    Line 1, Col 40:
    PLS-00103: Encountered the symbol "(" when expecting one of the following:
    Am I missing something in my code??
    I know this is really simple, but I really cant find what I am doing wrong??
    Thanks in advance

    Hello
    I am using OWB 11 with Oracle 11 and am hitting an error on something I would think is super simple in expression builder!
    So I been reading around the forums and havent been able to figure out what is going on with my transformation
    I drag and dropped the transformation "Anydata Cast" onto my mapping
    I select the target type as "VARCHAR" for casting
    I drag and drop the source column and drop it over the auto generated "CAST_SOURCE" from INGRP1
    I then drag CAST_TARGET from the OUTGRP1 to my target
    I right click the ANYDATA_CAST transformation and click on "Output Attributes" and click on the "..." to open the expression builder
    Then I input the following code
    CAST( INGRP1.CAST_SOURCE AS VARCHAR(10))
    And hit validate
    I then hit the following error
    Line 1, Col 40:
    PLS-00103: Encountered the symbol "(" when expecting one of the following:
    Am I missing something in my code??
    I know this is really simple, but I really cant find what I am doing wrong??
    Thanks in advance

  • Encountered the symbol create

    Hi guys I am trying to :
    CREATE or replace TYPE Complex AS OBJECT (
    rpart REAL,
    ipart REAL,
    MEMBER FUNCTION plus (x Complex) RETURN Complex
    CREATE TYPE BODY Complex AS
    MEMBER FUNCTION plus (x Complex) RETURN Complex IS
    BEGIN
    RETURN Complex(rpart + x.rpart, ipart + x.ipart);
    END plus;
    end;
    with Oracle Sql Developer 2.1 and 11g, but I get Error(6,1): PLS-00103: encountered the symbol "CREATE".
    Note that the code above is cut and paste from the Oracle Docs!!! Is this a bug of SQL Developer?!?!?!

    Justin,
    Yep, I'm talking about SQL Developer (version 2.1.0.63), and when I refer to a PL/SQL window I mean a Code Worksheet as opposed to a SQL worksheet. (In the Code worksheet I've got the "gears" icon where I can compile or compile for debug.) It is the default editor that opens when I open a .pks file that has both my pl/sql spec and body in it.
    So when I try to compile one of these PKS files that has the spec and body separated by the slash I get "Encountered the symbol "/". When I remove the slash and try to compile I get the error "Encountered the symbol CREATE".
    I understand these errors, and understand that If I pasted this script into a SQL worksheet and used F5 the code will compile with the "/" in it.
    Here is my question:
    Can I work with a file in the Code worksheet that has both the spec and body in it? If so, how do I get around the two errors mentioned above? We've used TOAD to date here and I'd rather move to SQL Developer. Do I have to break apart my pl/sql code files into separate spec and body files to make this move?
    Thanks,
    Bruce

  • Report:"encountered the symbol of namespace....."

    My Envirement:
    CentOS 4.7||Oracle11g||pro*c
    My file of nn.pc:
    [oracle@oracle11g work2]$ more nn.pc
    #include<iostream>
    using namespace std;
    #include "sqlca.h"
    EXEC SQL BEGIN DECLARE SECTION;
    char *uid="scott/scott@wilson";
    EXEC SQL END DECLARE SECTION;
    int main()
    EXEC SQL CONNECT :uid;
    count<<sqlca.sqlerrm.sqlerrmc<<endl;
    if(sqlca.sqlcode == 0)
    cout<<"yes"<<endl;
    else
    cout<<"no"<<endl;
    [oracle@oracle11g work2]$
    my file of pcscfg.cfg:
    [oracle@oracle11g admin]$ more $ORACLE_HOME/precomp/admin/pcscfg.cfg
    sys_include=(/u01/oracle/precomp/public,/usr/include,/usr/lib/gcc/i386-redhat-linux/4.1.1/include,/usr/lib/gcc/i386-redhat-li
    nux/3.4.5/include,/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include,/usr/lib/gcc/i586-suse-linux/4.1.0/include)
    ltype=short
    code=cpp
    cpp_suffix=cc
    parse=none
    SQLCHECK=SEMANTICS
    [oracle@oracle11g admin]$
    my file of /etc/profile:
    [oracle@oracle11g work2]$ more /etc/profile
    # /etc/profile
    # System wide environment and startup programs, for login setup
    # Functions and aliases go in /etc/bashrc
    pathmunge () {
    if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
    if [ "$2" = "after" ] ; then
    PATH=$PATH:$1
    else
    PATH=$1:$PATH
    fi
    fi
    # Path manipulation
    if [ `id -u` = 0 ]; then
    pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    fi
    pathmunge /usr/X11R6/bin after
    # No core files by default
    ulimit -S -c 0 > /dev/null 2>&1
    USER="`id -un`"
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
    HOSTNAME=`/bin/hostname`
    HISTSIZE=1000
    if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
    fi
    export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
    for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
    . $i
    fi
    done
    unset i
    unset pathmunge
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib;
    export LD_LIBRARY_PATH
    [oracle@oracle11g work2]$
    the error report:
    [oracle@oracle11g work2]$ source /etc/profile
    [oracle@oracle11g work2]$ proc nn.pc
    Pro*C/C++: Release 11.1.0.6.0 - Production on Sun Jun 21 20:15:44 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    System default option values taken from: /u01/oracle/precomp/admin/pcscfg.cfg
    Error at line 1, column 10 in file nn.pc
    #include<iostream>
    .........1
    PCC-S-02015, unable to open include file
    Syntax error at line 2, column 8, file nn.pc:
    Error at line 2, column 8 in file nn.pc
    using namespace std;
    .......1
    PCC-S-02201, Encountered the symbol "namespace" when expecting one of the follow
    ing:
    ; , = ( [
    Syntax error at line 11, column 2, file nn.pc:
    Error at line 11, column 2 in file nn.pc
    .1
    PCC-S-02201, Encountered the symbol "{" when expecting one of the following:
    ; , = ( [
    The symbol ";" was substituted for "{" to continue.
    Syntax error at line 0, column 0, file nn.pc:
    Error at line 0, column 0 in file nn.pc
    PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:
    ; { } ( * & + - ~ ! ^ ++ -- ... auto, break, case, char,
    const, continue, default, do, double, enum, extern, float,
    for, goto, if, int, long, ulong_varchar, OCIBFileLocator
    OCIBlobLocator, OCIClobLocator, OCIDateTime,
    OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
    OCIRaw, OCIString, register, return, short, signed, sizeof,
    sql_context, sql_cursor, static, struct, switch, typedef,
    union, unsigned, utext, uvarchar, varchar, void, volatile,
    while, an identifier, a typedef name, a precompiled header,
    a quoted string, a numeric constant, exec oracle,
    exec oracle begin, exec, exec sql, exec sql begin,
    exec sql type, exec sql var, exec sql include,
    Error at line 0, column 0 in file nn.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    [oracle@oracle11g work2]$
    =======================
    what does this mean? I searched google, but there's no corresponding solution.
    Edited by: user3032370 on 2009-6-22 上午2:03

    Hi,
    I am facing simialr issue on racle 11G
    PCC-S-02201, Encountered the symbol "namespace" when expecting one of the follow
    ing:
    } auto, char, const, double, enum, extern, float, int, long,
    ulong_varchar, OCIBFileLocator OCIBlobLocator,
    OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
    OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
    short, signed, sql_context, sql_cursor, static, struct,
    typedef, union, unsigned, utext, uvarchar, varchar, void,
    volatile, a typedef name, a precompiled header, exec oracle,
    exec oracle begin, exec, exec sql, exec sql begin,
    exec sql type, exec sql var, exec sql include,
    The symbol "exec," was substituted for "namespace" to continue.
    Syntax error at line 28, column 7, file ./gen/acd_lib_ppc.i:
    Error at line 28, column 7 in file ./gen/acd_lib_ppc.i
    using std :: ptrdiff_t ;
    ......1
    PCC-S-02201, Encountered the symbol "std" when expecting one of the following:
    ; , = ( [
    Error at line 0, column 0 in file ./gen/acd_lib_ppc.i
    Did you find any solution to this please?
    proc details:
    [fnetdba@gwl09072appd194 code]$ proc
    Pro*C/C++: Release 11.1.0.7.0 - Production on Mon Feb 20 11:25:12 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.

  • Report 3.0 oracle database 9i(Encounter the symbol "(" when expecting

    Hi,
    i am using oracle 9i database and report 3.0 and OS win xp
    and my procedure is
    PROCEDURE GET_MILLION_TEXT (MILLION IN NUMBER,MILLTEXT OUT VARCHAR2(30)) IS
    BEGIN
    SELECT ARA_TEXT1 INTO MILLTEXT FROM NUM_WORD WHERE NUMB=MILLION;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN NULL;
    END;
    while compiling i am getting the following error
    Encountered the symbol "(" when expecting one of the following
    if i change VARCHAR2(30) to VARCHAR2 then i am getting the following error
    Report Designer has encounter a problem and needs to close.(and then the report is going to close automatically)
    help will be appreciable thank you.
    Edited by: 960991 on May 18, 2013 5:08 AM

    hi,
    yes in oracle 9i it is working fine the below query
    PROCEDURE GET_MILLION_TEXT (MILLION IN NUMBER,MILLTEXT OUT VARCHAR2) IS
    butin oracle 10g database it is giving error
    "Report Designer has encountered a problem and needs to close. We are sorry for inconvenience."
    thank you.
    Edited by: 960991 on May 15, 2013 7:04 AM

  • Encountered the symbol "THENSELECT" and "OPEN"

    Im getting Encountered the symbol "THENSELECT" when expecting one of the following and Encountered the symbol "OPEN" I didnt get wats the problem here,please Help
    I posted the code in previous thread.
    Thankyou

    i found im using intermid instead of in_termid

Maybe you are looking for

  • Why do i pay so much not to not be able to use my phone

    I live in the country several miles outside of the range of a cell phone tower. So what i cant figure out is why do i need to pay $250 for a network extender when i pay verizon $110/month for a phone i cant use at my house? Im eligible for an upgrade

  • ITunes music playlists no longer syncing with iPhone on iOS 7?

    I have the latest version of iTunes, and iOS 7.1, but my playlists have not been synching with my device since iOS 7! I have tried completed disconnecting all music synching, then turning on a few playlists at a time, but nothing works. I have a few

  • Field description in the material master record

    Hello Our customer is requiring having 75 characters for the field MAKT-MAKTX instead of 40 as standard SAP. Is it possible to extend the length of this field up to 75 characters without any impact in SAP? Is there any way to go around this requireme

  • Looking for a linux that fits Oracle

    Hello! I am a student and im studying Oracle in Sweden. To this date i have been using Oracle on Windows and i want to change it to Linux now. I am looking into Fedora since the company i am gonna do my practice at are using Red Hat (and i cant pay f

  • Flash animation doesn't work when I publish Captivate file

    Hi, I have an e-learning developed by a third party using Captivate 6, they've inserted animations (swf files) created using Flash CS6. When I try publishing the Captivate file on my computer all the animations work well except for a particular one (