4-table join not returning all the data I need

  • Without knowing the primary key and foreign keys, this will be difficult to solve. Here is guess at your schema:

    create table SurveyQuestions

    ( QuestionID

    PRIMARY KEY ( QuestionID ) )

    create table dbo.SurveyChoices

    ( QuestionId

    , AnswerID

    , AnswerText

    PRIMARY KEY ( QuestionID , AnswerID ) )

    Create table InstallCardCustomerInformation

    ( InstallCardId

    , InstallersMemberID

    , PRIMARY KEY (InstallCardId ) )

    create table SurveyResults

    ( InstallCardId

    , QuestionID

    , AnswerID

    , PRIMARY KEY ( InstallCardId , QuestionID , AnswerID )

    , FOREIGN KEY ( InstallCardId ) references InstallCardCustomerInformation

    , FOREIGN KEY ( QuestionID , AnswerID ) references SurveyChoices

    )

    Is this correct ?

    SQL = Scarcely Qualifies as a Language

Viewing post 16 (of 15 total)

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