Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

The Bowling Challenge Expand / Collapse
Author
Message
Posted Friday, July 16, 2004 9:38 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Today @ 1:37 PM
Points: 6,779, Visits: 1,865
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/awarren/theb

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #126691
Posted Thursday, July 22, 2004 3:40 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, July 14, 2014 3:42 AM
Points: 807, Visits: 181

Hi Andy,

I have some questions  :

- Can there be multiple games for 1 UserId in the table ? And if so, should the procedure only list the score of the last game ?

- The inserts in your article all uses FrameNumber = 1. Is it up to the stored prcoedure to correct this, are is it a copy/paste mistake in the article ?

Greetings,

Bert De Haes

Post #127600
Posted Thursday, July 22, 2004 5:49 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 3:32 AM
Points: 3,347, Visits: 1,714

Also:

- can we assume that scores are entered in sequence, ie the RowID can be used to get the order that balls were thrown?

- will the table hold the scores for more than one player?



-----
James Lean
@jamesleansql
Post #127638
Posted Thursday, July 22, 2004 6:23 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 11, 2014 7:04 AM
Points: 144, Visits: 211
I think your sample data in the artice has a typo. Should the last two entries use values of (1,2,4) instead of (1,1,4).

Additionally, how do you intend to represent bonus balls in the tenth. If I bowl a 300, I throw three balls in the tenth frame. Sometimes bowlers refer to these extra balls as the eleventh and twelfth frames.

Would the values be three sets of (1, 10, 10) or would they be (1, 10, 10), (1, 11, 10), and (1, 12, 10)?

I can deal with either methodology. I just need to know what the test data will look like.



Post #127643
Posted Thursday, July 22, 2004 8:19 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:24 AM
Points: 33,088, Visits: 15,197
great questions. Ones I han't thought of. I'll ping Andy for some clarification.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #127683
Posted Thursday, July 22, 2004 8:29 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 4:48 PM
Points: 289, Visits: 71

I think the table should also have a GameNumber column so you can track the frames properly for each user if they bowl multiple games on the same day.





The greatest obstacle to transforming the world is that we lack the clarity and imagination to conceive that it could be different. -- Roberto Unger
Post #127686
Posted Thursday, July 22, 2004 10:30 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, February 20, 2014 8:25 AM
Points: 468, Visits: 1,023
Are there any restrictions on which version of SQL can be used to solve this problem?


Post #127729
Posted Thursday, July 22, 2004 12:32 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 18, 2014 7:02 AM
Points: 1,140, Visits: 701
What should the output look like if the last frame bowled was a strike and it wasn't the 10th frame? A NULL, maybe?


Frame 5 NULL


Or something else? Standardized output will make it easier for you to programatically test solutions, if that's your plan...


--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
Post #127761
Posted Thursday, July 22, 2004 1:24 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, April 9, 2008 7:08 PM
Points: 7, Visits: 10
two questions:
1. should we compensate for incomplete games, or assume the games are always going to consist of 10 frames?
2. do you want error checking/handling for invalid scores (scores over 10) being entered?



Post #127770
Posted Thursday, July 22, 2004 1:36 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 18, 2014 7:02 AM
Points: 1,140, Visits: 701
Getanothername, wouldn't you expect error checking to be handled by constraints rather than the query to select the data?

--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
Post #127772
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse