Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2015

    Unanswered: Enter parameter value

    Hi guys,

    I want to make a report for a database I have and I want it to show a percentage. Its a simple table with only 2 fields, where I want the percentage to be the amount of fields opposed to the total.
    Here is the query

    SELECT genre_name,(COUNT(genre_name)*100/(SELECT COUNT(*) FROM dbo_Movie_Genre)) As percentage
    FROM dbo_Movie_genre
    GROUP BY genre_name
    ORDER BY percentage DESC;

    Now this gives me the error: "enter parameter value" for percentage. Ive looked it up but its all kinda blurry to me.


  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    I would have written:
    SELECT genre_name
          ,(COUNT(genre_name)*100) / COUNT(*) As percentage
      FROM dbo_Movie_Genre;
    Have a nice day!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts