Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Pittsburgh, PA
    Posts
    41

    Unanswered: Table Design Question

    I am developing a scheduling solution that will track reservations in certain aeas of our building.

    My problem is that I have facilities that are subfacilities of other facilities and I will need to be able to pick those out.


    CREATE TABLE [dbo].[Facility] (
    [FacilityID] [int] IDENTITY (1, 1) NOT NULL ,
    [FacilityName] [varchar] (50) NULL ,
    [SubFacility] [int] NULL
    ) ON [PRIMARY]
    GO


    Given this table is it possible to get a list of facilities and their subfacilities.

    Thanks for your help.

    John

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you invert the logic to use the ParentFacilityId instead of the SubFacility, then yes. Using this design you have now, each facility can have only one sub-facility!

    -PatP

  3. #3
    Join Date
    Feb 2004
    Location
    Pittsburgh, PA
    Posts
    41
    Quote Originally Posted by Pat Phelan
    If you invert the logic to use the ParentFacilityId instead of the SubFacility, then yes. Using this design you have now, each facility can have only one sub-facility!

    -PatP

    Thanks alot Pat.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •