Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Raffle SQL Server Style


Raffle SQL Server Style

Author
Message
Alex Tocitu
Alex Tocitu
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 207
Comments posted to this topic are about the item Raffle SQL Server Style
Brandie Tarvin
Brandie Tarvin
SSCrazy Eights
SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)

Group: General Forum Members
Points: 9357 Visits: 8826
Our user group usually just signs a numbered sign-in sheet and someone pulls out a iPhone to go to Random.org to find the number. But you're correct. We should be using SQL Server.

This is one of the more entertaining scripts I've seen posted to these forums. Good job and thanks.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Jack Corbett
  Jack Corbett
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12672 Visits: 14863
I agree with Brandie, a entertaining and useful script.

We do the raffle tickets but this is better. Maybe add electronic sign-in to the meeting to generate the number for each participant.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Alex Tocitu
Alex Tocitu
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 207
Thanks for y'all comments so far.
I plan to put an interface on the sprocs - maybe WP7 to beat the iPhone?
Ron Porter
Ron Porter
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 316
I did something similar several years ago (dBXL, so maybe more than several!). It was for our trade show booth, so we had it up on the biggest screen we could find (eventually a projector).

My structure was a bit different, to say the least. I had Registrant, Event, Registration, Prize, EventPrize and Award tables (just guessing at the names at this late date). Registrant was name, phone, etc. Event was event name, start-end date, etc. Registration was to track who was registered for which event and had unique indexes to prevent multiple registrations for a single event. Prize was the list of prizes and EventPrize was to track which prizes were available to which events. EventPrize included a quantity field so that multiples of a given prize could be available to any event and had unique indexes to prevent any prize from being listed more than once for each event. The Award table joined Registration and Prize. There was a unique index to prevent any Registration from winning more than one prize.

The heart of the matter was some code to fill the Award table by randomly selecting Registrations and EventPrizes until the number of Award records per EventPrize equaled the quantity set in EventPrize. If I recall correctly, I managed the selection pool for prizes and used some kind of error handling to deal with 're-picks' of winners. (I wanted to learn how to do both things and any delays in picking a winner just added to the suspense during the draw.)

The fun part was figuring out how to make the 'drawing' flashy. I filled the screen by cycling up through the ASCII table for each letter in a winner's name until I hit the right letter for that position in the name. Actually, the whole thing was fun: this was my very first production quality relational database and was as much a learning exercise as anything else, although they did use that program for about 20 trade shows over the course of 4 or 5 years.

People could type in their own info, but we also had a couple of people working as data entry clerks to handle business cards and verbal registrations. That data entry program was pretty neat, too, but that's for a different day Smile
Alex Tocitu
Alex Tocitu
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 207
Ron,
It's amazing what people did with dBaseIII+; I was one of them back in the day :>Wink
Alvin Ramard
Alvin Ramard
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2996 Visits: 11595
Brandie Tarvin (1/6/2011)
Our user group usually just signs a numbered sign-in sheet and someone pulls out a iPhone to go to Random.org to find the number. But you're correct. We should be using SQL Server.

This is one of the more entertaining scripts I've seen posted to these forums. Good job and thanks.


We almost do the same. We normally use the presenter's laptop instead of the iPhone.



Alvin Ramard
Memphis PASS Chapter

All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help
Alex Tocitu
Alex Tocitu
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 207
Try running these scripts in Denali; can't beat SSMS editor Wink
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search