Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

SQL example to testing data: Difference between revisions

From Catglobe Wiki
New page: Version 5.5 ========================================= select top 10 Id, [name] from project_questionnaire_resource where [name] like '%minh_questionnaire_For_testing%' -- lay ve questionn...
 
No edit summary
Line 1: Line 1:
Version 5.5
Version 5.7
=========================================
=========================================
select top 10 Id, [name] from project_questionnaire_resource
select top 10 Id, [name] from project_questionnaire_resource
Line 6: Line 6:
-- lay ve questionnaire id cua PQ do ==>> 14
-- lay ve questionnaire id cua PQ do ==>> 14
select top 10 id, questionnaire_id from project_questionnaire
select top 10 id, questionnaire_id from project_questionnaire
where id = 5038
where id = 6059


-- lay ve cac question cua PQ do  
-- lay ve cac question cua PQ do  
select top 100 q.id, label, sub_question_count, question_type  
select top 100 q.id, label, sub_question_count, question_type  
from question q, questionnaire_question qq
from question q, questionnaire_question qq
where qq.questionnaire_id = 5142 and q.id = qq.question_id
where qq.questionnaire_id = 6384 and q.id = qq.question_id


-- lay ve cac answer option
-- lay ve cac answer option
select top 10 * from answer_option
select top 10 * from answer_option
where question_id = 212547
where question_id = 273102


select id as 'rpqid',[user_id] from resource_project_questionnaire
where project_questionnaire_id = 6059
order by id desc


-- lay ve answer  
-- lay ve answer  
select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
where resource_project_questionnaire_id = 15785316
where resource_project_questionnaire_id = 20595510
 
 
select top 10 * from data_open
where data_id = 127194938
 


select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
where resource_project_questionnaire_id = 20595517
select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
where resource_project_questionnaire_id = 20595518


Version 5.6
Version 5.6
Line 61: Line 63:




Version 5.7
Version 5.5
=========================================
=========================================
select top 10 Id, [name] from project_questionnaire_resource
select top 10 Id, [name] from project_questionnaire_resource
Line 68: Line 70:
-- lay ve questionnaire id cua PQ do ==>> 14
-- lay ve questionnaire id cua PQ do ==>> 14
select top 10 id, questionnaire_id from project_questionnaire
select top 10 id, questionnaire_id from project_questionnaire
where id = 6059
where id = 5038


-- lay ve cac question cua PQ do  
-- lay ve cac question cua PQ do  
select top 100 q.id, label, sub_question_count, question_type  
select top 100 q.id, label, sub_question_count, question_type  
from question q, questionnaire_question qq
from question q, questionnaire_question qq
where qq.questionnaire_id = 6384 and q.id = qq.question_id
where qq.questionnaire_id = 5142 and q.id = qq.question_id


-- lay ve cac answer option
-- lay ve cac answer option
select top 10 * from answer_option
select top 10 * from answer_option
where question_id = 273102
where question_id = 212547


select id as 'rpqid',[user_id] from resource_project_questionnaire
where project_questionnaire_id = 6059
order by id desc


-- lay ve answer  
-- lay ve answer  
select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
where resource_project_questionnaire_id = 20595510
where resource_project_questionnaire_id = 15785316
 


select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
select top 10 * from data_open
where resource_project_questionnaire_id = 20595517
where data_id = 127194938
select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data
where resource_project_questionnaire_id = 20595518

Revision as of 02:19, 29 April 2009

Version 5.7

=============================

select top 10 Id, [name] from project_questionnaire_resource where [name] like '%minh_questionnaire_For_testing%'

-- lay ve questionnaire id cua PQ do ==>> 14 select top 10 id, questionnaire_id from project_questionnaire where id = 6059

-- lay ve cac question cua PQ do select top 100 q.id, label, sub_question_count, question_type from question q, questionnaire_question qq where qq.questionnaire_id = 6384 and q.id = qq.question_id

-- lay ve cac answer option select top 10 * from answer_option where question_id = 273102

select id as 'rpqid',[user_id] from resource_project_questionnaire where project_questionnaire_id = 6059 order by id desc

-- lay ve answer select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 20595510

select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 20595517 select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 20595518

Version 5.6

=============================

select top 10 Id, [name] from project_questionnaire_resource where [name] like '%minh_questionnaire_For_testing%'

-- lay ve questionnaire id cua PQ do ==>> 14 select top 10 id, questionnaire_id from project_questionnaire where id = 5344

-- lay ve cac question cua PQ do select top 100 q.id, label, sub_question_count, question_type from question q, questionnaire_question qq where qq.questionnaire_id = 5521 and q.id = qq.question_id

-- lay ve cac answer option select top 10 * from answer_option where question_id = 248685

select id as 'rpqid',[user_id] from resource_project_questionnaire where project_questionnaire_id = 5344 order by id desc

-- lay ve answer select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 18104527


select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 18104533 select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 18104534


Version 5.5

=============================

select top 10 Id, [name] from project_questionnaire_resource where [name] like '%minh_questionnaire_For_testing%'

-- lay ve questionnaire id cua PQ do ==>> 14 select top 10 id, questionnaire_id from project_questionnaire where id = 5038

-- lay ve cac question cua PQ do select top 100 q.id, label, sub_question_count, question_type from question q, questionnaire_question qq where qq.questionnaire_id = 5142 and q.id = qq.question_id

-- lay ve cac answer option select top 10 * from answer_option where question_id = 212547


-- lay ve answer select top 100 id,option_number,[value],answer_option_id,question_id,[user_id],resource_project_questionnaire_id from data where resource_project_questionnaire_id = 15785316


select top 10 * from data_open where data_id = 127194938