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

  • Home
  • SEARCH
  • 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 527199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:51:25+00:00 2026-05-13T08:51:25+00:00

I am having problems with a line of code. I am trying to create

  • 0

I am having problems with a line of code. I am trying to create a count function for a view that I created. I have done this a bunch of different ways but below is the format that I have most recently used.

CREATE VIEW ERP_REPORT(EVENTNAME, DESCRIPTION, COUNT(RIDERS) AS
SELECT EVENTNAME, RACES.DESCRIPTION, 
       RIDERS_FIRSTNAME||' '||RTRIM(RIDERS_LASTNAME)
FROM EVENTS, RACES, PARTICIPATION, RIDERS
WHERE EVENTS.EVENTID = RACES.EVENTID
AND RACES.RACEID = PARTICIPATION.RACEID
AND RIDERS.RIDERID = PARTICIPATION.RIDERID
ORDER BY RIDERS.RIDERS_LASTNAME, EVENTNAME;

The error I am getting is ORA-00907: missing right parenthesis. The error is at the (COUNT(RIDERS) part of the code. Any ideas how I should tackle this?

  • 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-13T08:51:25+00:00Added an answer on May 13, 2026 at 8:51 am

    The list of names in parentheses on line 1 should be the names of the view columns:

    CREATE VIEW ERP_REPORT(EVENTNAME, DESCRIPTION, COUNT(RIDERS) AS ...
    

    You can’t create a column called “COUNT(RIDERS” or even “COUNT(RIDERS)” since a column name may not contain ( or ). This would work:

    CREATE VIEW ERP_REPORT(EVENTNAME, DESCRIPTION, RIDER_FULL_NAME) AS ...
    

    However it appears that you really do want a count of something, though I’m not sure of what. To do that the view definition would have to be something like:

    CREATE VIEW ERP_REPORT(EVENTNAME, DESCRIPTION, RIDER_COUNT) AS
    SELECT EVENTNAME, RACES.DESCRIPTION, COUNT(*)
    FROM EVENTS, RACES, PARTICIPATION, RIDERS
    WHERE EVENTS.EVENTID = RACES.EVENTID
    AND RACES.RACEID = PARTICIPATION.RACEID
    AND RIDERS.RIDERID = PARTICIPATION.RIDERID
    GROUP BY EVENTNAME, DESCRIPTION;
    

    (i.e. the COUNT function goes in the SELECT part, not in the list of column names).

    As an aside, since you are presumably new to Oracle, I would suggest you start using the more modern ANSI join syntax to make your queries clearer:

    ...
    FROM EVENTS
    JOIN RACES ON RACES.EVENTID = EVENTS.EVENTID
    JOIN PARTICIPATION ON PARTICIPATION.RACEID = RACES.RACEID
    JOIN RIDERS ON RIDERS.RIDERID = PARTICIPATION.RIDERID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 336k
  • Answers 336k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer int *(*pfp) (); Creates a pointer to a function that… May 14, 2026 at 3:47 am
  • Editorial Team
    Editorial Team added an answer It seems that the only reason you need a standard… May 14, 2026 at 3:47 am
  • Editorial Team
    Editorial Team added an answer Here's how you do the install: Installing Multiple Versions of… May 14, 2026 at 3:47 am

Related Questions

I am having problems with a fairly complex code. I wasn't able to produce
I have a NSTextView that I want to display a horizontal scroll bar. Following
I am having problems with SQL Server dropping a connection after I have dropped
I've got a very simple line of code in Objective-C: if ((selectedEntity != nil)
I have just begun working with the Android SDK and I am having problems

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.