How do I query to exclude the "first position of a 3 digit number"

  • Some hotels might have both, as descriptions sometimes change, but for purposes of infrastructure (electrical, plumbing, etc.)  they often serialize or ID things. However, if there's only one, often it's a description.

    Don't forget in many cases this system will be used by hotels in many places, so from monstrous casino hotels in Vegas with 100+ rooms/floor and over 1000 to the tiny hotels that have 2 floors and 20 rooms.

  • Room names are a human manifestation.  There's absolutely no reason why they cannot have a room number.  Hotels have also been know to change room names.  If you have a room number for the given space, history can continue without interruption.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I hope none of are proposing using the meeting room name as a primary key on the rooms table.  They are always subject to change....

    Doubt you will find many meeting rooms called Michael Jackson, Jimmy Saville or Gary Glitter.  My daugters school has just renamed most of it's houses because the old names have links to the slave trade....

     

  • You likely should encode the room name for internal use -- I'd probably call it "room_code" -- but you'll need at least a smallint, and I'd probably just "byte" the bullet and use an int, to be safe in the future.  Since you would never want to reuse a previous room code, a major remodeling might use up a bunch of codes.

    The customers should never see the room_code.  They should only see the "room number", which could be a name ("Lincoln", "Sunshine", etc.) or a number (904 (floor 9, room 4), 105, etc.).  That part follows what most hotels do, I believe.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.

  • This was removed by the editor as SPAM

Viewing 5 posts - 31 through 34 (of 34 total)

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