SQL Query

  • I got 2 tables. Type and Bet table.

    Type Table has : TypeID,TypeName,TypePrice

    Bet Table has : BetID,Num1,Num2,Num3,Num4,Num5,TypeID.

    Now I actually need to display These columns in my Datagrid. BetID,Num1,Num2,Num3,Num4,Num5,TypeName,TypePrice.

    How do I do this sql query. THanks

  • did you try :

    select B.BetID,B.Num1,B.Num2,B.Num3,B.Num4,B.Num5,T.TypeName,T.TypePrice

    from Bet B

    inner join

    Type T

    on

    B.TypeID = T.TypeID

    .....and if it's only for a specific TypeID you would do:

    select B.BetID,B.Num1,B.Num2,B.Num3,B.Num4,B.Num5,T.TypeName,T.TypePrice

    from Bet B

    inner join

    Type T

    on

    B.TypeID = T.TypeID where

    B.TypeID = ###







    **ASCII stupid question, get a stupid ANSI !!!**

  • Are you sure that this model is normalized?

  • if you're asking me remi - NO - I'm not sure...making assumptions!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Was asking Raj .

  • G.A.L remi...







    **ASCII stupid question, get a stupid ANSI !!!**

  • Been online 3 minutes... Life is being haved somewhere else.

    C ya tomorrow.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply