> Go the other way don't tear apart the old flat table. Create a
> report from the new data that pulls the pieces back together into a
> de-normalized flat table. That should just be normal joins and a fairly
> simple query.
Hmmm... had not thought about it from that direction; the WHERE cl
C. Hatton Humphrey wrote:
> Anyone have any better suggestions for a solution?
Go the other way don't tear apart the old flat table. Create a
report from the new data that pulls the pieces back together into a
de-normalized flat table. That should just be normal joins and a fairly
simple
Here's a fun question for the morning!
I have to write a query that compares the values in a flat table built
in FoxPro over a decade ago to it's newly built normalized version.
In the flat table there is an identifier column as well as a 39
columns (7 different items tracked with various value p
My first guess would be to look for triggers or circular foreign key
references. Often times people will declare a cascading delete on a foreign
key so when you delete the record, it deletes records in tables that are
related to it. But if one of those other tables has a foreign key that
points bac
so i just made a new sql server and moved data from the old.
every thing is singingly great...
except when i try to delete some thing
General Details:
[Macromedia][SQLServer JDBC Driver][SQLServer]Maximum stored
procedure, function, trigger, or view nesting level exceeded (limit
32).
: Re: SQL Question
Depends on your database. In sql server, it's an identity field, in
Oracle, you'd use a sequence and do mysequence.nextval.
Also, count is probably a reserved word in whatever database you're
using, so don't name your column that.
You might also be able
Depends on your database. In sql server, it's an identity field, in
Oracle, you'd use a sequence and do mysequence.nextval.
Also, count is probably a reserved word in whatever database you're
using, so don't name your column that.
You might also be able to do something like:
Insert into myTable(
Hey all,
How do I create a row in a query that contains a sequential number IE:
---
Count | Fieldname
Thanks
sas
--
Scott Stewart
ColdFusion Developer
SSTWebworks
4405 Oakshyre Way
Raleigh, NC. 27616
(919) 874-6229 (home)
(703) 220-2
PROTECTED]
> Sent: Monday, October 30, 2006 3:36 PM
> To: CF-Community
> Subject: RE: SQL Question
>
> Yep. I got this off the HOF SQL list:
>
>
> Select DateCreated, FirstName, LastName, Email
> from dbo.IBS_ShowLitRequest
> where coalesce( firstname,''
Whoops, I put the real db name in there but you get the idea.
-Original Message-
From: Duane [mailto:[EMAIL PROTECTED]
Sent: Monday, October 30, 2006 3:36 PM
To: CF-Community
Subject: RE: SQL Question
Yep. I got this off the HOF SQL list:
Select DateCreated, FirstName, LastName, Email
mail
>From dbo.IBS_ShowLitRequest
Where firstname is null and lastname is null and coalesce( email,'' ) <> ''
group by firstname, lastname, email
-Original Message-
From: Nick McClure [mailto:[EMAIL PROTECTED]
Sent: Monday, October 30, 2006 3:24 PM
To: CF
Which date do you want?
You aren't going to be able to do this easily because the email is distinct,
but the date is not.
> -Original Message-
> From: Duane [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 30, 2006 2:29 PM
> To: CF-Community
> Subject: RE: SQL Ques
The Dreaded Union?
> -Original Message-
> From: Duane [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 30, 2006 2:29 PM
> To: CF-Community
> Subject: RE: SQL Question
>
> That won't work. You have to include all the fields in your select
> statement
> in
That won't work. You have to include all the fields in your select statement
in your group by clause.
Duane
-Original Message-
From: William Bowen [mailto:[EMAIL PROTECTED]
Sent: Monday, October 30, 2006 3:17 PM
To: CF-Community
Subject: Re: SQL Question
Group By Email?
On 10/
Group By Email?
On 10/30/06, Duane <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a sql question for anyone willing to help me get my head unstuck.
>
>
> I have the following sample data:
>
> RegDate FirstName LastNameEmail
> 10/1/2006 NULL
gt; Hi All,
>
> I have a sql question for anyone willing to help me get my head unstuck.
>
>
> I have the following sample data:
>
> RegDate FirstName LastNameEmail
> 10/1/2006 NULLNULL[EMAIL PROTECTED]
> 10/2/2006 NULL
Hi All,
I have a sql question for anyone willing to help me get my head unstuck.
I have the following sample data:
RegDate FirstName LastNameEmail
10/1/2006 NULLNULL[EMAIL PROTECTED]
10/2/2006 NULLNULL[EMAIL PROTECTED
Correct.
I've often pined for a "list" grouping functionwhich would have helped
you in this situation. SOmething like:
select emp_id, list(location_id) as location_ids
from table
where whatever
grouped by emp_id
Then the output would be:
Emp ID Location_ids
1
G Money wrote:
> How so?
>
> I still don't think he's going to get the values in a list form in a single
> column using just SQL.
>
> On 9/12/06, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
>>left outer join would have worked better
left outer join would not have worked at all. Try it.
simple j
something like that
> >
> >
> > -Original Message-
> > From: Duane [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 11, 2006 5:13 PM
> > To: CF-Community
> > Subject: SQL Question
> >
> > Hi All,
> >
> > Is there anyway with
Locid
>
>
> Did not test it but something like that
>
>
> -Original Message-
> From: Duane [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 11, 2006 5:13 PM
> To: CF-Community
> Subject: SQL Question
>
> Hi All,
>
> Is there anyway within an sql q
I was using asp.net repeaters, and couldn't figure the nesting out. There
were 4 columns in the output that had to be nested.
Duane
-Original Message-
From: Nick McClure [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 12, 2006 9:42 AM
To: CF-Community
Subject: RE: SQL Question
You could have nested a while loop in the output loop.
> -Original Message-
> From: Duane [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 12, 2006 8:19 AM
> To: CF-Community
> Subject: RE: SQL Question
>
> I ended up using cursors and creating a temp table o
I ended up using cursors and creating a temp table on the fly.
Duane
-Original Message-
From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED]
Sent: Monday, September 11, 2006 10:20 PM
To: CF-Community
Subject: Re: SQL Question
you might be able to leverage the coalesce function like this
you might be able to leverage the coalesce function like this article:
http://www.sqlteam.com/item.asp?ItemID=2368
On 9/11/06, Duane <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is there anyway within an sql query to return a sub query that has multiple
> records? Ex:
>
> Users:
> UID Name
> 1
Duane wrote:
>
> I'm trying to get around some pain in the ass stuff using the asp repeater
> control.
ASP? Ouch, there's your problem ;)
~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-da
I wish I could use CF for this :(
I'm trying to get around some pain in the ass stuff using the asp repeater
control.
Duane
-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED]
Sent: Monday, September 11, 2006 6:18 PM
To: CF-Community
Subject: Re: SQL Question
Duane
Adkins, Randy wrote:
>
> Select users.uid, users.name, locations.location
> From users
> inner join UserLoc on UserLoc.UID = users.uid
> inner join locations on UserLoc.LocID = locations.Locid
>
> Did not test it but something like that
It wouldn't work. It would return multiple rows for each
Duane wrote:
>
> Is it possible to return a record set that looks like:
> UID NameLocation
> 1 FredMain Office, Cafeteria
> 2 Bob Gymnasium
> 3 MaryCafeteria
Not that I'm aware of. You'd have to either build a stored procedure or
return the data like this:
UID
day, September 11, 2006 5:13 PM
To: CF-Community
Subject: SQL Question
Hi All,
Is there anyway within an sql query to return a sub query that has
multiple records? Ex:
Users:
UID Name
1 Fred
2 Bob
3 Mary
UID LocID
1 1
1 2
2 3
3 2
LocID Locatio
Hi All,
Is there anyway within an sql query to return a sub query that has multiple
records? Ex:
Users:
UID Name
1 Fred
2 Bob
3 Mary
UID LocID
1 1
1 2
2 3
3 2
LocID Location
1 Main Office
2 Cafeteria
3 Gymnasium
Is it pos
d to be "Myrtle Beach
AFB FCU".
Military has a lot of credit unions.
- Matt
- Original Message -
From: "Jerry Johnson" <[EMAIL PROTECTED]>
To: "CF-Community"
Sent: Monday, April 03, 2006 3:14 PM
Subject: Re: Tim's House closing was (RE: SQL Question
bject: Re: Tim's House closing was (RE: SQL Question, Switch Case )
Does anyone know if this also used to be called the Naval Air Federal
Credit Union?
I once built a set of kiosks that functioned as mulitmedia-rich ATMs
without the money slot for the NAFCU.
On 4/3/06, Scott Stewart <[EM
Does anyone know if this also used to be called the Naval Air Federal
Credit Union?
I once built a set of kiosks that functioned as mulitmedia-rich ATMs
without the money slot for the NAFCU.
On 4/3/06, Scott Stewart <[EMAIL PROTECTED]> wrote:
> I've got all of my accounts and two mortgages thro
day, April 03, 2006 2:44 PM
To: CF-Community
Subject: Re: Tim's House closing was (RE: SQL Question, Switch Case )
Yep... I'm buying a new car and I'm going to try them (I've been a member
since 1990). They have fantastic rates. Also, they are the largest credi
F-Community"
Sent: Monday, April 03, 2006 2:06 PM
Subject: RE: Tim's House closing was (RE: SQL Question, Switch Case )
> If this one goes under, try Navy Federal Credit Union. You should be
> eligible under vet status. They're fast and will work with you.
>
> Glad to
2:25 PM
To: CF-Community
Subject: RE: Tim's House closing was (RE: SQL Question, Switch Case )
Can't do the VA thing, too much money, or this shit would have been dealt
with already.
--
Timothy Heald
Analyst, Architect, Developer
[EMAIL PROTECTED]
W: 202-228-8372
C: 703-300-3911
---
06 PM
To: CF-Community
Subject: RE: Tim's House closing was (RE: SQL Question, Switch Case )
If this one goes under, try Navy Federal Credit Union. You should be
eligible under vet status. They're fast and will work with you.
Glad to know that the insurance came through..
Thanks
puter.
-Original Message-
From: Loathe [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 2:01 PM
To: CF-Community
Subject: RE: Tim's House closing was (RE: SQL Question, Switch Case )
It didn't.
We lost our mortgage 2 hours before the closing.
Going with a new company now.
300-3911
>-Original Message-
>From: Scott Stewart [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 03, 2006 10:12 AM
>To: CF-Community
>Subject: Tim's House closing was (RE: SQL Question, Switch Case )
>
>Thanks Tim,
>
>How'd the closing go?
>
>
#x27;s House closing was (RE: SQL Question, Switch Case )
Thanks Tim,
How'd the closing go?
Thanks
Scott
Scott A. Stewart
Webmaster/ Developer
GlobalNet Services, Inc
http://www.gnsi.com
11820 Parklawn Dr
Rockville, MD 20852
Voice: (301) 770-9610 x 335
Fax: (301) 770-9611
The info
>We don't know. I was trying to see if it was even possible before
>attempting.
I very much doubt it is going to help you. Stored procedures are faster because
they are preplanned and precompiled, but with all the LIKE statements it is
pretty much impossible to use a partial indexscan on the tab
ictly
prohibited. If you have received this communication in error, please notify
us immediately by replying to the message and deleting it from your
computer.
-Original Message-
From: Loathe [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 02, 2006 9:10 PM
To: CF-Community
Subject: RE: SQL Que
2006 6:47 AM
To: CF-Community
Subject: Re: SQL Question, Switch Case
> Here's what I have, it was written by another developer but I've been
tasked
> with trying to make it run faster
>
>
> SELECT top 100
> INVN AS EntityId, ...
> FRO
don't have to mees around with the wheres and ands.
--
Timothy Heald
Analyst, Architect, Developer
[EMAIL PROTECTED]
W: 202-228-8372
C: 703-300-3911
-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED]
Sent: Friday, March 31, 2006 11:19 AM
To: CF-Community
Subject: SQL Que
> Here's what I have, it was written by another developer but I've been tasked
> with trying to make it run faster
>
>
> SELECT top 100
> INVN AS EntityId, ...
> FROM ENTITY_ALL
> WHERE 1 = 1
>
> AND
>
>
> ENTITY_ALL.INVN LIKE '%#attributes.Keywords#%'
>
.
>
> ((ENT
You can do something like the code below. The default case (for all) cannot
be handled by a case statement, sot it has to be handled by a separate query
(chosen by an if statement). Also, I am not on MS-SQL server any more
(currently using oracle) and I am not sure if I remember the concatenation
54 PM
> To: CF-Community
> Subject: RE: SQL Question, Switch Case
>
> Chris,
>
> Here's what I have, it was written by another developer but I've been
> tasked
> with trying to make it run faster
>
>
> SELECT top 100
> INVN AS EntityId,
&
cipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this communication in error, please notify
us immediately by replying to the message and deleting it from your
computer.
-Original Message-
From:
Well it *would* work but its will probably not give you what you are looking
for in the format you have it (assumption on my part). Basically what the
where clause is saying is where @someVar = (the result of the case
statement)
So assuming in your example that @someVar is coming in with a value o
fy
us immediately by replying to the message and deleting it from your
computer.
-Original Message-
From: Chris Stoner [mailto:[EMAIL PROTECTED]
Sent: Friday, March 31, 2006 12:51 PM
To: CF-Community
Subject: Re: SQL Question, Switch Case
Or to more directly tie in with your questio
Or to more directly tie in with your question:
SELECT*
FROMMY_FAKE_TABLE
WHEREFAKE_COLUMN = CASE
WHEN FAKE_COLUMN_2 = 'A' THEN @ARGUMENT_A
WHEN FAKE_COLUMN_2 = 'B' THEN @ARGUMENT_B
ELSE @ARGUMENT_DEFAULT
END
On 3/31/06, Chris Stoner <[EMAIL
Yes to a point...such as you can do something like my example below (not
tested,obviously). The issue you will run into is that you wont be able to
have a where clause with multiple filters. You basically can use the case
statement to equate a specific column to another column depending on the
co
All,
Can you use a switch case statement to build a dynamic where clause based on
parameters passed to a stored procedure?
I'm using T-SQL in SQLServer 2000
IE:
Case where entity_type is X
"piece of where clause"
Case where enity_type is Y
"piece of where clause"
Thanks
Sco
Supercool!
That worked to get the multiple (> 2) records located.
Thanks for you help!!!
On 7/29/05, Deanna Schneider <[EMAIL PROTECTED]> wrote:
> Try this.
>
> SELECT contentid
> FROM mytable
> GROUP BY contentid
> Having count(contentid) = 2
>
>
>
> On 7/28/05, William Bowen <[EMAIL PROTE
select content_id, count(*) as cnt
from your_table
group by content_id
having cnt > 1
On 7/28/05, William Bowen <[EMAIL PROTECTED]> wrote:
> there must be a way to do this but I just can't think of it...
>
> I've got a Boundary table that holds the list of tree nodes for a web site.
>
> the
Try this.
SELECT contentid
FROM mytable
GROUP BY contentid
Having count(contentid) = 2
On 7/28/05, William Bowen <[EMAIL PROTECTED]> wrote:
> there must be a way to do this but I just can't think of it...
>
> I've got a Boundary table that holds the list of tree nodes for a web site.
>
> the
there must be a way to do this but I just can't think of it...
I've got a Boundary table that holds the list of tree nodes for a web site.
there are two columns. content_ID and boundary
now, for each "record" in the tree there are two entries, a beginning
boundary and an ending boundary
so reco
Thank you for noticing. :)
On 7/7/05, Loathe <[EMAIL PROTECTED]> wrote:
> You sir are a sexy biotch :)
>
> -Original Message-
> From: Marlon Moyer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 07, 2005 10:53 PM
> To: CF-Community
> Subject: Re: SQL Ques
You sir are a sexy biotch :)
-Original Message-
From: Marlon Moyer [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 07, 2005 10:53 PM
To: CF-Community
Subject: Re: SQL Question
I had a little extra code in the previous one.
insert into application_skills
SELECT AS candidate_id
I had a little extra code in the previous one.
insert into application_skills
SELECT AS candidate_id,
AS
skill_id,
as
proficiency_id,
skillType_id
FROMcomputerSkills_lookup where skill_id =
On 7/7/05, Marlon Moyer <[EMAIL PROTECTED]> wro
insert into application_skills
SELECT AS candidate_id,
AS
skill_id,
as
proficiency_id,
skillType_id
FROM(select skillType_id from computerSkills_lookup where skill_id =
) skills
On 7/7/05, Loathe <[EMAIL PROTECTED]> wrote:
> Is there anywa
; It's SQL Server 2000 btw.
>
> -Original Message-
> From: Loathe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 07, 2005 10:29 PM
> To: CF-Community
> Subject: SQL Question
>
>
> Is ther
.
>
> -Original Message-
> From: Loathe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 07, 2005 10:29 PM
> To: CF-Community
> Subject: SQL Question
>
>
> Is there anyway to make something like
Oh,
It's SQL Server 2000 btw.
-Original Message-
From: Loathe [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 07, 2005 10:29 PM
To: CF-Community
Subject: SQL Question
Is there anyway to make something like this work:
insert into application_s
Is there anyway to make something like this work:
insert into application_skills
(
candidate_id,
skill_id,
proficiency_id,
n Childress [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 02, 2005 4:19 PM
> To: CF-Community
> Subject: Re: dumb sql question
>
> Internally, the grouping may occur in a different order, and the
> dataset may be output in a different order. However, in this case the
> resulting
-0500, Nick McClure <[EMAIL PROTECTED]> wrote:
> The order is very important, it will group based on the order of those
> items.
>
> > -Original Message-
> > From: Cameron Childress [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 02, 2005 3:27 PM
> >
The order is very important, it will group based on the order of those
items.
> -Original Message-
> From: Cameron Childress [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 02, 2005 3:27 PM
> To: CF-Community
> Subject: Re: dumb sql question
>
> I'm pretty su
I'm pretty sure the order is irrelevant, but it should be easy enough
to verify with a couple of CFDUMPs of the result.
I've done my fair share of reporting and stats lately, and I'm pretty
sure my initial code should work.
-Cameron
On Wed, 2 Mar 2005 11:54:03 -0600, Raymond Camden <[EMAIL PROT
or
each *unique* combination of the *values* of the columns specified in
the GROUP BY"
M!ke
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 11:54 AM
To: CF-Community
Subject: Re: dumb sql question
Hmm, so I thought that when you di
02, 2005 11:54 AM
To: CF-Community
Subject: Re: dumb sql question
Hmm, so I thought that when you did
GROUP BY A, B, C
that it _first_ grouped by A, then B, etc.
So if A is the day of the month, it would group all items with the same
Day of Mo
Hmm, so I thought that when you did
GROUP BY A, B, C
that it _first_ grouped by A, then B, etc.
So if A is the day of the month, it would group all items with the
same Day of Month, then group by B. Or am i wrong?
On Wed, 2 Mar 2005 08:48:11 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote:
No, I don't think so. They will both have the same day() month(), year().
-Cameron
On Wed, 2 Mar 2005 09:28:14 -0600, Raymond Camden <[EMAIL PROTECTED]> wrote:
> Won't your group be broken though if two sales occur on the same day
> of the month?
~~~
D)
FROM Table
GROUP by oneDay
ORDER BY oneDay
> -Original Message-
> From: Raymond Camden [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 02, 2005 10:28 AM
> To: CF-Community
> Subject: Re: dumb sql question
>
> Sorry, I forgot to say - this is MS Access (yes yes, I kn
Won't your group be broken though if two sales occur on the same day
of the month?
On Tue, 1 Mar 2005 18:33:54 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote:
> Depending on platform - something like:
>
> SELECT sum(amount) as sales, day(transdate) + month(transdate) +
> year(transdate)
> F
lumn IS NOT NULL
> GROUP BY
> CONVERT(varchar(10), dateColumn, 105)
> ORDER BY
> dateColumn
>
> M!ke
>
> -Original Message-
> From: Raymond Camden [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 01, 2005 8:12 PM
> To: CF-Community
> Subject: d
Oh... count... :) Same - but count(somecolumn)
:)
-Cameron
On Tue, 1 Mar 2005 18:33:54 -0800, Cameron Childress <[EMAIL PROTECTED]> wrote:
> Depending on platform - something like:
>
> SELECT sum(amount) as sales, day(transdate) + month(transdate) +
> year(transdate)
> FROM orders
> GROUP BY
Depending on platform - something like:
SELECT sum(amount) as sales, day(transdate) + month(transdate) + year(transdate)
FROM orders
GROUP BY day(transdate), month(transdate), year(transdate)
-Cameron
On Tue, 1 Mar 2005 20:11:39 -0600, Raymond Camden <[EMAIL PROTECTED]> wrote:
> I want to count
dateColumn IS NOT NULL
GROUP BY
CONVERT(varchar(10), dateColumn, 105)
ORDER BY
dateColumn
M!ke
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 8:12 PM
To: CF-Community
Subject: dumb sql question
I want to count the number of orders per
I want to count the number of orders per day, where the datetime
property has, obviously, a date and time. I want to ignore the time
and just get a sum based on date. I know this is simple, but it's been
a real long day.
--
===
R
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 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 a
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 co
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 t
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 approa
*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
reco
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]
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, BLAC
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]
[Subscript
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 t
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) = c.blackj
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.
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.
>
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
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?
Updat
*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]
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]
> 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]
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]
3:19 PM
To: CF-Community
Subject: SQL Question
Pretty basic sql question, but, hey, I'm a pretty basic guy!
I have a table of people (people a) and a table of uploads with the
person's id in it (upload b). I'd like to display the top 10, say,
uploaders. What do I use for this??
1 - 100 of 105 matches
Mail list logo