tararan
-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by tararan
-
-
hey guys i'm kinda stuck at this one problem. let me explain the issue. I have 3 tables 'movie', 'request', and 'video'. MOVIE table includes the title and MovieID (this is the PK), the REQUEST table includes Customer ID and the MovieID that they are requesting. And finally the Video table includes MovieID, Copynum(there are more than 1 copy for each movieID).i need to show the movie title, number of request for a certain movie title, and the total number of copies of each requested movies.this is what i have so far.select movie.title,count(request.movieID)from movie, requestwhere request.movieID = movie.movieIDgroup by title;this query gives me the title and the number of request for that movie. what i can't figure out is how to add the total number of copies for movies that have been requested. please help! Thanks
-
I finally got it! thanks for your time aspnetguy.
-
sweet! I'm going to try this out! Thanks again for your time.
-
Sounds good, i just wanted to make sure i wasn't doing anything wrong. I knew i was following the right convention.if it's not too much trouble for yah, you think you can walk me through the saving a .sql and using sqlplus to load the query file.i've reading on it this morning on this text that i'm using and it's not very clear on its steps. i appreciate your help. sorry, i know i'm asking too much.From what I can tell Oracle does not support this.Here is an article explaining how to do this with PHP and Oracle. http://www.oracle.com/technology/pub/artic..._multirows.htmlAnother option is to cut and paste the query multiple times in a text file (changing the values of course) and save it as a .sql and use SQLPlus to load the query file. -
I'm using ORACLE. thanks.
-
Hi everybody! This is my first post here and after reading a few thread i might be here to stay. There are plenty of useful info and helpful people on this board. Glad to be here.Anywho, I'm very new to SQL and here's one of my problem right now. 1. I'm receiving an error everytime i try to insert more than one row at a time. for example:SQL> insert into customer (CustID, lastName) 2 values(123, 'bigs'), (124, 'tave');values(123, 'bigs'), (124, 'tave') *ERROR at line 2:ORA-00933: SQL command not properly ended
count function in multilple tables
in SQL
Posted
it's all done guys. it took me awhile cuz the result i was getting was multiplied by the number of actual copies of the videos. I just had to divide the number of request by the of copies of the videos.