Survey Responses: SSMS SQL query

Hi All,

I"m a beginner in the world of SQL. I've made a basic query to find all our survey responses to the postcode / country question in last FY.

However, the results aren't showing what I'm expecting.

>They don't show any numbers above 3000 (postcodes go up to 9999 in australia) and

>they don't show any countries. 

I've checked that this question is assigned as #1 in the TR_SURVEY_QUESTION TABLE

QUERY:

SELECT * FROM [dbo].[T_SURVEY_RESPONSE] WHERE question_no=1 AND create_dt BETWEEN '2017-07-01' AND '2018-06-30';

SAMPLE OF RESULTS:

We can get this info in T-stats but keen to compare in SSMS.

Thanks for any advice!

Parents
  • When you fill in the survey question, are you making entry directly into the field, or are you selecting a value from a dropdown?  If the latter, then the value saved to the response table is the ID of the table used as the reference for the dropdown.  Check the TR_SURVEY_QUESTION table and note the Ref Table, and Ref Idcol columns.  If they're filled in, then the value in the response table will be the selected value from that column and table.  

Reply
  • When you fill in the survey question, are you making entry directly into the field, or are you selecting a value from a dropdown?  If the latter, then the value saved to the response table is the ID of the table used as the reference for the dropdown.  Check the TR_SURVEY_QUESTION table and note the Ref Table, and Ref Idcol columns.  If they're filled in, then the value in the response table will be the selected value from that column and table.  

Children