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 6826503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:09:18+00:00 2026-05-26T22:09:18+00:00

Can anyone help me by telling me what is wrong with the following syntax?

  • 0

Can anyone help me by telling me what is wrong with the following syntax? I am just trying to run a simple SELECT statement in a stored procedure.

CREATE OR REPLACE PROCEDURE PVSSRDB.GETBATTERYSTATUSFORALLLOGGERS
(
  p_Logger OUT e.comment_,
  p_tStamp OUT h.ts,
  p_Val    OUT h.value_number
)
AS
BEGIN
  select 
    e.comment_,
    max(h.ts),
    avg(h.value_number)
INTO
  p_Logger,
  p_tStamp,
  p_Val
FROM 
  PVSSRDB.ELEMENTS e inner join PVSSRDB.DB15MINHISTORY_00100009 h on h.element_id =e.element_id
WHERE 
  e.element_name like 'System1:H%.BatteryCondition'
GROUP BY
  e.comment_
ORDER by 2 asc
END GETBATTERYSTATUSFORALLLOGGERS;

I keep getting the same 3 errors stating:

  • Error(9,3): PL/SQL: SQL Statement Ignored
  • Error(23,18): PL/SQL: ORA_00933: SQL command not properly ended
  • Error(24,34): 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 << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge
  • 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-26T22:09:19+00:00Added an answer on May 26, 2026 at 10:09 pm

    You’re missing a semicolon after the ORDER BY 2 asc

    Also you need to declare your OUT parameters properly.

    CREATE OR REPLACE 
    PROCEDURE PVSSRDB.GETBATTERYSTATUSFORALLLOGGERS (
       p_Logger OUT PVSSRDB.ELEMENTS.comment_%TYPE,
       p_tStamp OUT PVSSRDB.DB15MINHISTORY_00100009.ts%TYPE,
       p_Val    OUT PVSSRDB.DB15MINHISTORY_00100009.value_number%TYPE
    ) 
    AS 
    BEGIN
       select e.comment_,
              max(h.ts),
              avg(h.value_number) 
         INTO p_Logger,
              p_tStamp,
              p_Val 
         FROM PVSSRDB.ELEMENTS e 
        inner join PVSSRDB.DB15MINHISTORY_00100009 h on (h.element_id =e.element_id)
        WHERE e.element_name like 'System1:H%.BatteryCondition' 
        GROUP BY   e.comment_ 
        ORDER by 2 asc; 
    END GETBATTERYSTATUSFORALLLOGGERS; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can anyone help me with construction of an IF in a stored procedure in
can anyone help me in trying to check whether JavaScript is enabled in client
can anyone help? I have a simple html file which i am filling via
Can anyone help, i trying to figure what i need to do, i have
Can anyone help me as what is going wrong here? Am not able to
Can anyone help me in by telling me how can I output my XML
Can anyone help me trying to find out why this doesn't work. The brushes
Can anyone help me with the trying to write SQL (MS SqlServer) - I
can anyone help me find out what the problem is? I'm trying to make
Can anyone help me with writing a simple example of the for loop in

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.