Go Back   CHECKBOX® Online Community > Checkbox® > CHECKBOX® Survey Server 4.x

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2008, 05:13 PM
Junior Member
 
Join Date: Mar 2008
Posts: 19
Default Need help with sql query

I would love some assistance with a sql query against the checkbox database.

What I am trying to do is output a report via the backend database of all the active survey names and the text of their questions, and the question type.

I am going nuts trying to figure this out and it seems to me that someone else may already have one or more queries that would work.

The following Query will give me the QuestionIDs and the Survey Names, but getting the question text is eluding me.

SELECT app_survey.ckbx_Item.ItemID, app_survey.ckbx_Item.ItemTypeID, app_survey.ckbx_ItemType.ItemName,
app_survey.ckbx_ItemType_Categories.CategoryName, app_survey.ckbx_FormsAndFoldersView.ItemName AS SurveyName,
app_survey.ckbx_FormsAndFoldersView.IsActive, app_survey.ckbx_FormsAndFoldersView.ResponseCount,
app_survey.ckbx_FormsAndFoldersView.Owner, app_survey.ckbx_FormsAndFoldersView.DateCreated,
app_survey.ckbx_Template_Items.TemplateID AS SurveyID
FROM app_survey.ckbx_Item INNER JOIN
app_survey.ckbx_ItemType ON app_survey.ckbx_Item.ItemTypeID = app_survey.ckbx_ItemType.ItemTypeID INNER JOIN
app_survey.ckbx_ItemType_Categories ON app_survey.ckbx_ItemType.CategoryID = app_survey.ckbx_ItemType_Categories.CategoryID INNER JOIN
app_survey.ckbx_Template_Items ON app_survey.ckbx_Item.ItemID = app_survey.ckbx_Template_Items.ItemID INNER JOIN
app_survey.ckbx_FormsAndFoldersView ON app_survey.ckbx_Template_Items.TemplateID = app_survey.ckbx_FormsAndFoldersView.ItemID
WHERE (app_survey.ckbx_ItemType.CategoryID = 1000) AND (app_survey.ckbx_FormsAndFoldersView.ItemType = 'Form') AND
(app_survey.ckbx_FormsAndFoldersView.IsActive = 1)

Thank you for your time and assistance,
Bonnie
Reply With Quote
  #2 (permalink)  
Old 08-18-2008, 02:56 PM
Senior Member
 
Join Date: Mar 2007
Posts: 201
Default

Unfortunately I can only provide detailed development support to users who own the development kit. That being said I would look in the ckbx_Text table.
Reply With Quote
Reply

Tags
sql query question text

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 07:53 AM.


SEO by vBSEO 3.2.0