Hello, I have a question on how to make the below SQL code provide the proper looking result in my report. What I want the report to do is have the answers for each question organized in a way that for each answer the questions that have that same answer are listed togther. I'm very new to this, so I'm sorry if I don't explain it well. Here's an example:
What stores are in NY?
Syracuse
Albany
Atlanta
What stores are in Georgia?
Syracuse
Albany
Atlanta
After they are answered I want the report to look like this:
Stores in NY:
Syracuse
Albany
Stoes in Georgia:
Atlanta
See how Syracuse and Albany are grouped together because they are both in NY. The code I have now (not written by me) works but the answers are not grouped together. Here is the code in my report:
SELECT DISTINCTROW Confidentiality.JobID, Confidentiality.Amount AS [Use#], Responses_1.Response AS UseDesc, Responses.Response AS TypeLtr, Responses.JobDescr AS TypeDesc FROM Responses AS Responses_1 INNER JOIN (Responses INNER JOIN Confidentiality ON Responses.RespID = Confidentiality.RespID) ON Responses_1.RespID = Confidentiality.Amount;
The Confidentiality table holds the user's answers and has JobID as a key. RespID is like the cities up above. Amount is like the states above.
The Responses table stores all questions and possible answers and has RespID as a key. Response holds the values like states above. JobDescr holds the values like cities above.
Can anyone help me change this code to organize the results the way I want them? Thanks for any help!!
What stores are in NY?
Syracuse
Albany
Atlanta
What stores are in Georgia?
Syracuse
Albany
Atlanta
After they are answered I want the report to look like this:
Stores in NY:
Syracuse
Albany
Stoes in Georgia:
Atlanta
See how Syracuse and Albany are grouped together because they are both in NY. The code I have now (not written by me) works but the answers are not grouped together. Here is the code in my report:
SELECT DISTINCTROW Confidentiality.JobID, Confidentiality.Amount AS [Use#], Responses_1.Response AS UseDesc, Responses.Response AS TypeLtr, Responses.JobDescr AS TypeDesc FROM Responses AS Responses_1 INNER JOIN (Responses INNER JOIN Confidentiality ON Responses.RespID = Confidentiality.RespID) ON Responses_1.RespID = Confidentiality.Amount;
The Confidentiality table holds the user's answers and has JobID as a key. RespID is like the cities up above. Amount is like the states above.
The Responses table stores all questions and possible answers and has RespID as a key. Response holds the values like states above. JobDescr holds the values like cities above.
Can anyone help me change this code to organize the results the way I want them? Thanks for any help!!