urgent...please help with code

Discussion in 'ASP General' started by Joey Martin, Feb 17, 2005.

  1. Joey Martin

    Joey Martin Guest

    Please, please help with me with this code. I thought I had it figured
    out, but no such luck.

    I have two tables, raceresultsview and jockeyselections.

    In jockeyselections, I have jockey names and stableid, for example Pat
    Day, stableid 1000.
    In raceresultsview, I have jockey names, and placement.

    I want to do something like this:
    select * from raceresultsview where jockey in (select jockey from
    jockeyselections). This works FINE, but I need to figure out how to grab
    the stableid, too.

    Each time there is a match, I want to insert the stableid and placement
    into the table named winnings.

    How do I get this to work?


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Joey Martin, Feb 17, 2005
    #1
    1. Advertising

  2. Joey Martin

    dlbjr Guest

    What database are you using?

    --
    dlbjr
    Pleading sagacious indoctrination!
    dlbjr, Feb 17, 2005
    #2
    1. Advertising

  3. Joey Martin

    dlbjr Guest

    INSERT INTO matches ( JockeyId, StableID )
    SELECT jockeyselections.JockeyID, jockeyselections.StableID
    FROM jockeyselections INNER JOIN raceresultsview ON
    jockeyselections.JockeyID = raceresultsview.JockeyID;


    --
    dlbjr
    Pleading sagacious indoctrination!
    dlbjr, Feb 17, 2005
    #3
  4. Joey Martin

    Joey Martin Guest

    Thanks, but I figured it out.


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Joey Martin, Feb 17, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    509
    Chris Uppal
    May 5, 2005
  2. Yucky Corpulent
    Replies:
    5
    Views:
    405
  3. KK
    Replies:
    2
    Views:
    556
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,751
    Mike Hewson
    Jan 7, 2005
  5. Pravin Shetty
    Replies:
    2
    Views:
    358
    Major_Small
    Jan 28, 2005
Loading...

Share This Page