![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to create a routine for generating tables from a master response table. The end result would increment the variable "somevalue" by one and then create the next table (ie: TESTTEST2). Is there a way to insert the variable into the Table Name as well as one or more of the Field Names within the table? I've tried some different syntax variations and haven't hit on the right combo yet! |
#3
| |||
| |||
|
|
The end result would increment the variable "somevalue" by one and then create the next table (ie: TESTTEST2). |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
"Questions" stores a question_id and the question text "Responses" stores a response_id and the response text |
|
I would like to create a view that would "flatten" all the question/ responses [Questionnaires] to a single line item for each company. |
#6
| |||
| |||
|
|
The current joins look something like this: LEFT OUTER JOIN cstd_company_qualifier_question_response qualifier1 ON qualifier1.company_id = oncd_company.company_id AND (qualifier1.company_qualifier_question_id = 'Q01' OR qualifier1.company_qualifier_question_response_id IS NULL) LEFT OUTER JOIN csta_company_qualifier_responses qualifier_responses1 ON qualifier_responses1.quest_resp_id = qualifier1.company_qualifier_response_id LEFT OUTER JOIN cstd_company_qualifier_question_response qualifier2 ON qualifier2.company_id = oncd_company.company_id AND (qualifier2.company_qualifier_question_id = 'Q02' OR qualifier2.company_qualifier_question_response_id IS NULL) LEFT OUTER JOIN csta_company_qualifier_responses qualifier_responses2 ON qualifier_responses2.quest_resp_id = qualifier2.company_qualifier_response_id LEFT OUTER JOIN cstd_company_qualifier_question_response qualifier3 ON qualifier3.company_id = oncd_company.company_id AND (qualifier3.company_qualifier_question_id = 'Q03' OR qualifier3.company_qualifier_question_response_id IS NULL) LEFT OUTER JOIN csta_company_qualifier_responses qualifier_responses3 ON qualifier_responses3.quest_resp_id = qualifier3.company_qualifier_response_id .... this goes on to the last question. |
![]() |
| Thread Tools | |
| Display Modes | |
| |