Results 1 to 6 of 6

Thread: sql help

  1. #1
    Join Date
    Oct 2008
    Posts
    16

    Unanswered: sql help

    i have just created a database and want to output the table to allow me to delete records . I have created the table using a join . I have created 3 tables one with actor with an id and name , the same for director and a cast table combining them together . I then created a join table to show the cast id with the name of director and actor .Now i want to create an update statment based on this to update the director/ actor id(cast table) columns when the user enters a known actor/director name.

    SELECT Cast.Cast_Id, Director.Director_name, Actor.Actor_name FROM Cast INNER JOIN Actor ON Cast.Actor_Id = Actor.Actor_Id INNER JOIN Director ON Cast.Director_Id = Director.Director_Id

    Can anyone help me create an update column

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What is the database created in?

    Can you post the table structures rather than just a description of a query?
    table_name(key_field_1, key_field_2, other_field, another_field, ..., etc)
    George
    Home | Blog

  3. #3
    Join Date
    Oct 2008
    Posts
    16
    ok so heres the tables
    Actor_Id pk
    Actor_name

    Director_Id pk
    Director_name


    Cast_Id pk cast table
    Director_Id fk
    Actor_Id fk

    So i have managed to create a table in vb using the create custom statement using a select query to display the cast table only displaying the actual director and actors names instead of the id.

    SELECT Cast.Cast_Id, Director.Director_name, Actor.Actor_name FROM Cast INNER JOIN Director ON Cast.Director_Id = Director.Director_Id INNER JOIN Actor ON Cast.Actor_Id = Actor.Actor_Id

    Now i want to successfully be able to update the table displayed(above) when updated .This updates the cast table.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    And what is the database - Access, mySQL, SQL Server, etc?
    George
    Home | Blog

  5. #5
    Join Date
    Oct 2008
    Posts
    16
    sql server

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Moved to SQL Server topic
    George
    Home | Blog

Posting Permissions

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