Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
john8122
Starting Member
1 Post |
Posted - 2007-07-03 : 00:08:55
|
| Hello, I am very new to SQL program.I am trying to write a statement.I have three table's, which I am using.Table location(the atributtes are csid, city, state)Table studios ( the attributtes are studioid, studio_name, location)Table movies (the attributtes are movieid, movietitle, studioid1)My goal is to display the title of the movie, the city and the state where the studio is located that made the movie, for those studios in California (CA)Here is the statement which I wrote:Select movies.movietitle, location.city, location.stateFrom moviesInner join location,On location.csid=studios.location, studios.studioid=movies.studiosid1where location.state= 'CA';Can anyone tell me where I went wrong with my statement? The SQL program said that I made an error.Thank! I hope someone able help me! |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-07-03 : 00:15:42
|
| Select movies.movietitle, location.city, location.stateFrom moviesjoin studios On movies.studiosid1 = studios.studioidjoin location on studios.location = location.csidwhere location.state= 'CA'--------------------------------------------------S.Ahamed |
 |
|
|
|
|
|
|
|