Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:48:19+00:00 2026-05-25T00:48:19+00:00

I tried to create a SQL procedure on an Oracle server. Here is my

  • 0

I tried to create a SQL procedure on an Oracle server. Here is my code,

private const string InsertCallProc =
        @"CREATE OR REPLACE PROCEDURE INSERTCALL (Id in varchar2,No in varchar2,
           Surname in varchar2, Name in varchar2, CallType in varchar2,
           CallDate in date, CallNo in varchar2, VoiceNetwork in varchar2,
           Type in varchar2,TalkTime in number,PriceWithDiscount in number,
           PriceWithoutDiscount in number, LmTime in date)
        AS
            BEGIN
                INSERT INTO TMOBILE_R_CALLS (ID,NO,SURNAME,NAME,CALL_TYPE,CALL_DATE,CALL_NO, 
                    VOICE_NETWORK, TYPE,TALK_TIME, PRICE_WITH_DISCOUNT, PRICE_WITHOUT_DISCOUNT,LM_TIME)
                VALUES(Id, No, Surname, Name, CallType,CallDate, CallNo, VoiceNetwork,Type, TalkTime, 
                    PriceWithDiscount,PriceWithoutDiscount, LmTime);
    END;";

Method with execute this sql cmd, input parameter is InsertCallProc field.

    private void ExecuteNonQueryCmd(string cmdText)
    {
        using (var conn = new OracleConnection(GenerateConnectionString()))
        {
            conn.Open();

            var cmd = new OracleCommand
            {
                Connection = conn,
                CommandText = cmdText
            };

            try
            {
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }

If I called this method, the procedure is created. But if I check the procedure in PL/SQL developer I see this:

Compilation errors for PROCEDURE SYSTEM.INSERTCALL

Error: PLS-00103: Encountered the symbol “” when expecting one of the
following:

current Line: 1 Text: CREATE OR REPLACE PROCEDURE INSERTCALL (Id in
varchar2,No in varchar2,

I think this is caused by formatting the string in C# code. Because if I execute the same SQL code on Oracle server procedure is created without problems.

What is a good solution for this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:48:20+00:00Added an answer on May 25, 2026 at 12:48 am

    Perhaps it’s the newlines embedded in your C# string. The error

    Encountered the symbol “” when expecting one of the following

    indicates to me that there’s a special character that’s not printable being encountered. It’s also indicating that the problem is in the first line.

    Also, it’s generally a Bad Idea to create objects in the SYSTEM or SYS schemas.

    As for the answers pointing the finger at reserved word use: while it’s not a very good practice, it is likely not the culprit here:

    SQL> CREATE OR REPLACE PROCEDURE p(TYPE IN VARCHAR2) IS
      2  BEGIN
      3    dbms_output.put_line(TYPE);
      4  END;
      5  /
    
    Procedure created
    SQL> DECLARE
      2  BEGIN
      3    p('This is a test');
      4  END;
      5  /
    
    This is a test
    
    PL/SQL procedure successfully completed
    
    SQL> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a simple Oracle Stored Procedure: CREATE OR REPLACE PROCEDURE
I have a SQL Server Stored Procedure that looks like this: CREATE PROCEDURE [dbo].[my_stored_procedure]
I am using Views in my stored Procedure(SQL-Server). For Improving Performance, I have tried
I tried to create a Style for DataGridTextColumn with the following code <Style TargetType={x:Type
I'm trying to create stored procedure in MySQL Community Server 5.5.16: CREATE UNIQUE SEQUENCE
I'm trying to create a procedure which extracts data from a MySQL server (using
I am using SQL Server 2008 Enterprise. I have tried that if I set
Using SQL Server 2008 I created a Stored Procedure called MyStoreProc and it runs
I have created the following stored procedure.. CREATE PROCEDURE [dbo].[UDSPRBHPRIMBUSTYPESTARTUP] ( @CODE CHAR(5) ,
I am having difficulty executing a MS SQL Server stored procedure from Java/jsp. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.