Gel,
No amount of casting will turn them into the same values. For example
"7" will never be "IN" ("7,8,9,10"). The comma-delimted value that
you're storing will never be seen as a list, because it's just a
string.

You'd have to manually loop over the values in the comma delimited
list and do a comparison on each one - which would have to be done in
a stored procedure - which access doesn't really support. So, to do
this in the database, you're going to have to change your database.

Your only other option would be to do it in CF. But, that's just ugly
ugly ugly. Bite the bullet and change the DB.

On Wed, 18 Aug 2004 11:30:43 -0400, Angel Stewart  wrote:
> mrfff.
>
> I just tried this with no luck.
>
> SELECT *
> FROM tblblackjack
> WHERE str(tblblackjack.blackjackid) IN (Select blackjack from
> tblcasinos)
> ORDER BY tblblackjack.blackjackdesc
>  
> str(tblblackjack.blackkjackid) was supposed to convert the blackjackid
> value to a string, and then I was hoping to be able to compare this to
> the string returned from (Select Blackjack from tblCasinos)
> I no longer get the datatype mismatch error, so some conversion was
> done.
>
> But I also get 0 records returned, which just ain't right.
>
> So apparently converting the value to character /string doesn't work.
>
> Using an ALias doesn't work either.
>
> For example
>
> select str(tblblackjack.blackjackid) AS BlackjackID from tblblackjack
> blah blah
> WHERE BlackJackID = tblcasinos.blackjack
>
> produces a dialog box that asks for the value of the BlackjackID
> parameter in MS ACcess. *sigh*.
>
> -Gel
>
>
> -----Original Message-----
> From: Tangorre, Michael
>
> Not sure what approach would suit you best here as I am not a fan of
> Access for web apps at all, so I have next to no experience writing
> queries in Access to the degree that would be needed to accomplish what
> you are trying to do. Perhaps someone else can chime in. I still say
> that your best approach is to yes, rewrite the queries only after you
> fix the table structure! :-)
>
> Michael T. Tangorre
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to