Gel,
How did you make out?
Procedure below
CREATE PROCEDURE SELECT_BLACKJACK_TYPES
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
*sigh*
Well.
First problem is that I'm using Microsoft Access.
Second problem is that the casinos table has several fields that are
meant to collect gametypes.
Blackjack,poker,slots,videoslots,tablegames I think.
Each of these right now is gathering a comma delimited list of different
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
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
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
I got it :)
You need to use TRIM because MS Access inserts a space infront the value
for the sign.
So,
SELECT tblcasinos.casinoname, tblcasinos.blackjack AS CasinoBlackjack,
FROM tblblackjack, tblcasinos
WHERE tblcasinos.blackjack = Trim(str(tblblackjack.blackjackid))
Works as if you did
Yeah, I realised that after I solved the string issue.
I did end up doing it in CF..I know its dirty..but there are a number of
factors preventing me from redoing the database structure and all the
data forms at this time.
But hey!
We learned how to convert numerics to String succesfully in
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
SELECT b.blackjackid, b.blackjackdesc
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) =
I'd stop the bus and fix the tables now. Why move forward with a crappy
design. Crap on top of crap equals crap.
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
If you can not modify the tables, or just don't want to... check this
article out.
http://www.sqlteam.com/item.asp?ItemID=2652
Mike
I'd stop the bus and fix the tables now. Why move forward
with a crappy design. Crap on top of crap equals crap.
[Todays Threads]
[This Message]
I just tested this out. It is long and somewhat cumbersome, but see how it
works in terms of speed.
I assume you are on SQL Server, if not, save this snippet for a rainy day.
I took a stab from your information at how the tables might look. Adjust
accordingly.
CASINO: CASINO_ID, CASINO_NAME,
How do you update an int field to a null value in sql server 2000?
Phillip b
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
From: Phillip B
How do you update an int field to a null value in sql server 2000?
Update myTable
Set myField=NULL
Where myOtherField=value
Difficult, innit? :P
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
update table set field = NULL
should do it.From memory, standard caveats.
--BenD
Phillip B wrote:
How do you update an int field to a null value in sql server 2000?
Phillip b
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
*Smacks head*
I was rushing and fogot the myField=part.
Phillip B.
Philip Arnold wrote:
From: Phillip B
How do you update an int field to a null value in sql server 2000?
Update myTable
Set myField=NULL
Where myOtherField=value
Difficult, innit? :P
[Todays Threads]
[This
I thought it was a trick question.
- Original Message -
From: Philip Arnold
To: CF-Community
Sent: Monday, May 10, 2004 1:27 PM
Subject: RE: quick SQL question
From: Phillip B
How do you update an int field to a null value in sql server 2000?
Update myTable
Set myField=NULL
Where
Ummm sure. That's what it was. A trick question.
I can't believe you guys fell for it.
Look at the monkey!
Beth wrote:
I thought it was a trick question.
http://www.houseoffusion.com/banners/view.cfm?bannerid=40
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
18 matches
Mail list logo