Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get question answers from Archer database

MargaritaScott
Contributor III

Hi, 

we built a questionnaire that consists of a question and answers (yes/no/N/A). We are trying to extract question answers using sql query, but no luck so far. Here is the query:

 select
sr.File_Review_ID
, RN.DISPLAYNAME
, C.NAME_FULL
, C.TITLE
, C.ORG_UNIT
, sr.Last_Update_Date_Date
,qval.Value
,qval.Id answerid
,Progress
from ARCHER_BUSINESS_HIERARCHY.DBO.Advanced_Support_Recovery_Subsequent_F sr
left join ARCHER_BUSINESS_HIERARCHY.DBO.Advanced_Support_Recovery_Subsequent_F_File_Reviewer_Name rn on rn.ParentContentId = sr.ContentId
left join ARCHER_BUSINESS_HIERARCHY.DBO.Contacts_Advanced_Support__Recovery__Subsequent_F_x_Advanced_Support_Recovery_Subsequent_F_Recovery_Specialist_Name sn on sn.Advanced_Support_Recovery_Subsequent_F_Recovery_Specialist_Name_ContentId = sr.ContentId
LEFT JOIN ARCHER_BUSINESS_HIERARCHY.DBO.Contacts c on c.ContentId = sn.Contacts_Advanced_Support__Recovery__Subsequent_F_ContentId
left join ARCHER_BUSINESS_HIERARCHY.DBO.Advanced_Support_Recovery_Subsequent_F_Q10 q on sr.ContentId = q.ParentContentId
left join ARCHER_BUSINESS_HIERARCHY.DBO.enum_Q104 qval on qval.Id = q.Value

We understand that e.g ARCHER_BUSINESS_HIERARCHY.DBO.enum_Q104 will have the answer but for some reason we are not getting it. 

Does anybody know how to get question answers using sql query? Thanks so much!

0 REPLIES 0