FROM tblblackjack b, tblcasinos c
WHERE b.blackjackid = c.blackjack
ORDER BY b.blackjackdesc
I have no db's runnning at home so I can't test it but
you need to convert one of the fields.
Oracle I think you could do a
WHERE TO_CHAR(b.blackjackid) = c.blackjack
MS SQL might be:
where convert(char(20), b.blackjackid) = c.blackjack
-sm
--- Angel Stewart <[EMAIL PROTECTED]>
wrote:
> Two tables.
>
> Main tblcasinos table.
> Has text field called Blackjack which contains a
> value list of blackjack
> types. Yes..bad way to do it, but it's done.
>
> Second table tblblackjack, contains the typeid
> (autonumber) , and the
> typedescription which is the text that is actually
> going to be
> displayed.
>
> So..in select box, I only want to display blackjack
> game types that are
> actually in a particular casino.
>
> If there are 200 blackjack game types, but the
> casinos in the database
> only support 20 of them, there's no point in
> bringing back a select box
> with 200 entries (yikes!).
>
> So, I tried this code:
>
> SELECT blackjackid,blackjackdesc
> FROM tblblackjack
> WHERE tblblackjack.blackjackid IN (Select blackjack
> from tblcasinos)
> ORDER BY tblblackjack.blackjackdesc
>
> It throws a data type mismatch error. I am assuming
> this is because
> tblblackjack.blackjackid is a Long Integer, and
> tblcasinos.blackjack is
> a String.
>
> Sooo...given that this is how the tables are laid
> out, and that it can't
> practically be changed at the moment, how would I
> narrow the results to
> only those blackjack Ids that are contained in
> tblcasinos records.
>
> Hewp 0_0
>
> -Gel
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
