For example, I have a single competition entry for the following people that appears in this Entries table:
EntryID Email EntryDate FirstName LastName
1 email@example.com 12/28/2010 12:23:45 PM Gabriel Markov
2 firstname.lastname@example.org 12/28/2010 12:25:01 PM Marie Smith
3 email@example.com 12/28/2010 12:26:30 PM John Smith
A few minutes later Marie invites 4 of her friends to enter too and so she gets an extra four entries in one go:
4 firstname.lastname@example.org 12/28/2010 12:27:25 PM Marie Smith
5 email@example.com 12/28/2010 12:27:25 PM Marie Smith
6 firstname.lastname@example.org 12/28/2010 12:27:25 PM Marie Smith
7 email@example.com 12/28/2010 12:27:25 PM Marie Smith
My script currently reads her initial entry and uses a cursor to insert new records for each entry. EntryID is an identity fields that auto-increments and the date comes from getdate(), all the other data is duplicated from the original entry.
Marie's friends like to spend their lunch hour online, and so the site gets quite heated for the next hour while her friends enter as well and invite their friends along too. Given the method I'm using, is this the best, or is there a better way that does not use a cursor?