sql code

  • To start I have a table that has ticketholders. Each ticket holder has a unique number and each ticket holder is associated to a so called household number. You can have multiple guests w/i a household.

    I would like to create 3 flags (form a, for a household that has 1-4 gst) form b 5-8 gsts and form c for household that has 9 or more.

    What would be the easiest?

    How can I set this flag by the number of guests in a household?

  • David, rather than create 3 separate flags in one table why not create a "guestscount" table like...

    id NumGuests

    1 1-4

    2 5-8

    3 9+

    Then use the guest id in the household table?

    Doug

  • Hard to be sure from the simple example given, but I might go further with

    HouseholdID, MinGuests, MaxGuests

    1 1 4

    2 5 8

    ...

  • I would have to agree with Steve.

    😎

  • I can't disagree with it either 😎

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply