You are on page 1of 3

1.

"Insert into mst_file(surveyid,pageid,flag,filetype,filecontent,filename,entby ,entdt,keyid) values (" + sid + "," + pageid + ",0,'" + filetype + "',@fileconte nt,'" + filename + "'," + rid + ",curdate(),'" + keyid + "');select last_insert_ id();"; 2."SELECT ViewContInfo,ContInfo FROM mst_survey where surveyid=" + sid; 3."Insert into mst_file(surveyid,pageid,flag,filetype,filecontent,filename,entby ,entdt,filesize,keyid) values (" + sid + "," + pageid + ",0,'" + filetype + "',@ filecontent,'" + filename + "'," + rid + ",curdate(),'" + filesize + "','" + key id + "');select last_insert_id();"; 4."delete from mst_file where surveyid=" + sid + " and pageid=" + pageid + " and EntBy=" + rid + " and keyid='" + keyid + "' and qid is null and aid is null" 5."Select filename,filetype,filecontent from mst_file where surveyid=" + sid + " and pageid=" + pageid + " and EntBy=" + rid + " and keyid='" + keyid + "'" 6."Select Count(*) From trn_userresponse where surveyid=" + sid + " and userid=" + rid + " and questionid=" + qid + " and answerid=" + ansid 7."Select Active,Status From mst_survey where surveyid=" + sid 8."Select count(*) From trn_surveyresponse where userid=" + rid + " and surveyid =" + sid + " and keyid='" + key + "'" 9."delete from trn_userresponse where surveyid=" + sid + " and userid = " + rid + " and keyid='" + key + "';delete from mst_file where surveyid=" + sid + " and keyid='" + key + "'" 10."Insert Into trn_surveyresponse(keyid,surveyid,status,startdt,entdt,emailflg) values (UUID()," + sid + ",0,curdate(),curdate(),0);select last_insert_id();" 11."Select keyid from trn_surveyresponse where id=" + i 12."Insert Into trn_surveyresponse(keyid,surveyid,userid,status,startdt,ip,email ,fname,entdt) values ('" + key.ToString() + "'," + sid + "," + rid + "," + statu s + ",curdate(),'" + ip + "','" + email + "','" + fname + "',curdate());Select l ast_inserted_id();" 13."Select pageid from Mst_Page where surveyid=" + sid + " order by pageno LIMIT 1" 14."Update trn_surveyresponse set status=0,moddt=curdate() where surveyid=" + si d + " and userid = " + rid + " and keyid='" + keyid + "'" 15."Update trn_surveyresponse set status=0,moddt=curdate() where surveyid=" + si d + " and userid = " + rid + " and keyid='" + keyid + "' and status=0" 16."Update trn_surveyresponse set status=2,enddt=curdate(),moddt=curdate(),Batch Completed = BatchCompleted + 1 where surveyid=" + sid + " and userid = " + rid + " and keyid='" + key + "'" 17."Select answerid,pageid,questionid,answertext,(select AnonymousSurvey from ms t_survey where surveyid=" + sid + ") as anonymous,(select surveyname from mst_su rvey where surveyid=" + sid + ") as surveyname,(select ifnull(fname,'N/A') from trn_surveyresponse where surveyid=" + sid + " and keyid='" + keyid + "') as fna me,(select ifnull(lname,'N/A') from trn_surveyresponse where surveyid=" + sid + " and keyid='" + keyid + "') as lname,(select ifnull(email,'N/A') from trn_surve yresponse where surveyid=" + sid + " and keyid='" + keyid + "') as email,(select emailid from mst_question where questionid=a.questionid) as user from trn_answe rs a where surveyid=" + sid + " and EmailAlert=1;Select answerid,answertext,suba nsid,subanstext,subansoptionid,subansoptiontext,questionid from trn_userresponse where surveyid=" + sid + " and keyid='" + keyid + "';Select QuestionId,Question Text,AnswerTypeID from mst_question where surveyid=" + sid + " order by srno" 18."Select recuringsurvey from mst_survey where surveyid=" + sid 19."Select BatchCompleted from trn_surveyresponse where surveyid=" + sid + " and userid=" + rid + " and keyid='" + key + "'" 20."Insert into trn_userresponse(Keyid,Surveyid,pageid,srno,userid,questionid,an swerid,answertext,subansid,subanstext,subansoptionid,subansoptiontext,answerrate ,TempData,entdt,batchno) values ('" + keyid + "'," + sid + "," + pgid + ",1," + rid + "," + qid + "," + ansid + ",'" + anstext.Replace("'", "''") + "'," + suban sid + ",'" + subanstext.Replace("'", "''") + "'," + optionid + ",'" + optiontext + "'," + subansrate + "," + Case + ",curdate()," + batchno + ")" 21."Select id from mst_file where surveyid=" + sid + " and pageid=" + pgid + " a nd entby=" + rid + " and qid is null and aid is null order by id LIMIT 1"

22."Update mst_file set qid=" + qid + ",aid=" + ansid + " where id=" + id 23."delete from trn_userresponse where surveyid=" + sid + " and userid=" + rid + " and keyid='" + keyid + "' and pageid=" + pgid + " and TempData=" + Case + ";d elete from mst_file where surveyid=" + sid + " and pageid=" + pgid + " and EntBy =" + rid + " and qid=" + qid + " and aid=" + ansid + " and keyid='" + keyid + "' ;delete from mst_file where keyid='" + keyid + "' and surveyid=" + sid 24."Select questionid,answerid,answertext,CASE WHEN subansid IS NULL THEN 0 ELSE subansid END as subansid,CASE WHEN subansoptionid IS NULL THEN answerid ELSE su bansoptionid END as optionid,CASE when subanstext = '' then answertext else suba nstext end as subanstext from trn_userresponse where surveyid=" + sid + " and u serid=" + rid + " and keyid='" + keyid + "' and pageid=" + pgid + " order by id" 25."SELECT * FROM trn_anscondition where surveyid=" + sid 26."SELECT a.surveyid, a.surveyname,a.QueSrNo,a.ShowSurveyName,b.pageid,b.pagena me,c.questionid,c.questiontext,c.answertypeid,c.talign,d.answerid,d.answertext,c .quebold,c.queitalic,c.ansbold,c.ansitalic,c.ansreq,c.maxtextlen,c.mintextlen,a. backcolor,c.halign,a.quecolor,a.quesize,a.anscolor,a.anssize,e.subanswerid,e.sub anstext,e.srno as SrnoMatrix,e.subansrate,f.optionid,f.optiontext,f.optionrate a s optionsrno,c.srno as qsrno,c.numericreq,c.allowsearch,d.answerrate,a.RendomAns FROM mst_survey AS a INNER JOIN Mst_Page AS b ON a.surveyid = b.surveyid INNER JOIN mst_question AS c ON b.pageid = c.pageid left JOIN trn_answers AS d ON c.qu estionid = d.questionid left join trn_subanswer as e on d.answerid = e.answerid left join trn_subanswer_option as f on e.subanswerid = f.subanswerid where a.su rveyid=" + sid + " order by a.surveyid,b.pageno,c.srno,e.subanswerid,e.srno" 27."SELECT id,surveyid,qid,pageid,aid,filetype,filecontent,filename from mst_fil e where surveyid=" + sid 28."SELECT filetype,filecontent,filename from mst_file where id=" + id 29."Select pageid from Mst_Page where SurveyId='" + entobj.SurveyId + "' and pag eno='" + entobj.PageNo + "'" 30."Select QuestionId,srno,pageid,questiontext,AnswerTypeId,AnsReq,MaxTextLen,Mi nTextLen,precondition, (select answertypename from mst_answertype where AnswerTy peId=mst_question.AnswerTypeId) as a,quebold,queitalic,ansbold,ansitalic,ansreq, halign,(select pageno from Mst_Page where pageid=mst_question.pageid) as pageno from mst_question where surveyid='" + entobj.SurveyId + "' and pageid='" + entob j.PageId + "' order by srno ;" 31."Select AnswerID,PageId,QuestionId,AnswerText,(select pageno from Mst_Page wh ere pageid=trn_answers.pageid) as pageno from trn_answers where surveyid='" + en tobj.SurveyId + "' and pageid='" + entobj.PageId + "' order by rand() ;" 32."Select pageid,questionid,answerid from trn_userresponse where userid='" + en tobj.EntBy + "' and surveyid='" + entobj.SurveyId + "' and pageid='" + entobj.P ageId + "';" 33."Select surveyname,Skipflg,RandomQue,RendomAns,backcolor,quecolor,quesize,ans color,anssize from mst_survey where surveyid='" + entobj.SurveyId + "';" 34."select id,qid, answerid, selected,questionid, (select answertext from trn_an swers where answerid=trn_anscondition.answerid) as answertext, (select questiont ext from mst_question where questionid=trn_anscondition.questionid) as questiont ext from trn_anscondition where surveyid='" + entobj.SurveyId + "';" 35."select pagename,pageno,pageid from Mst_Page where surveyid='" + entobj.Surve yId + "';" 36."select count(*) from trn_surveyresponse where surveyid='" + surveyid + "' an d userid=" + userid + "" 37."Select userid,surveyid,questionid,answerid,answertext,subansid,answerrate,sr no from trn_userresponse where userid='" + entobj.EntBy + "' and surveyid='" + e ntobj.SurveyId + "' order by pageid,srno " 38."Select subanswerid,subanstext from trn_subanswer where surveyid=" + surveyid + " and questionid=" + qid + " Order by subanswerid" 39."insert into trn_surveyresponse (userid, surveyid,entdt) values ('" + entobj .EntBy + "','" + entobj.SurveyId + "',curdate());" 40."insert into trn_userresponse (userid, surveyid,pageno,questionid,answerid,s ubansid, answertext,entdt,srno) values ('" + entobj.EntBy + "','" + entobj.Surve yId + "','" + entobj.PageNo + "','" + entobj.QuestionId + "','" + entobj.AnswerI

d + "','" + entobj.SurveyId + "','" + entobj.AnswerText + "',curdate(),'" + ento bj.SrNo + "');" 41."Select userid,(select name from my_aspnet_Users where id=userid) as username ,surveyid,questionid,answerid,answertext,subansid,answerrate,srno from trn_userr esponse where surveyid='" + surveyid + "' order by userid,srno ;" 42."Select questionid,questiontext,answertypeid,srno,ansreq,maxtextlen,mintextle n,pageno from mst_question where surveyid=" + surveyid + " order by pageno,srno; " 43."Select (select name from my_aspnet_Users where id=userid) as username,userid from trn_surveyresponse where surveyid=" + surveyid + ";" 44."select Skipflg from mst_survey where surveyid='" + surveyid + "' " 45."select fname,lname,email from trn_surveyresponse where keyid='" + key + "' a nd surveyid=" + sid + " and status=0" 46."select fname,lname,email from trn_surveyresponse where keyid='" + key + "' a nd surveyid=" + sid 47."delete from mst_file where id=" + fileid + " and qid is null and aid is null " 48."delete from mst_file where surveyid=" + sid + " and pageid=" + pgid + " and keyid='" + keyid.ToString() + "'" 49."Update mst_sharesurvey set ViewCount = ViewCount + 1 where surveyid=" + sid 50."select status from mst_user where userid=" + rid; 51."select usertype from mst_user where userid = (select entby from mst_survey w here surveyid=" + surveyid + ")" 52."Select questionid,questiontext,answertypeid from mst_question where surveyid =" + surveyid + " order by questionid" 53."Select id,keyid,questionid,answerid,subansid,subanstext,subansoptionid,suban soptiontext,AnswerText,answerrate from trn_userresponse where surveyid=" + surve yid + " and keyid='" + keyid + "'" 54."Select (select username from mst_user where userid=a.entby) as username,ifnu ll(fname,'N/A') as fname,ifnull(lname,'N/A') as lname,(select surveyname from ms t_survey where surveyid=a.surveyid) as sname,ifnull(email,'N/A') as email,(selec t AnonymousSurvey from mst_survey where surveyid=a.surveyid) as anony from trn_s urveyresponse a where surveyid=" + surveyid + " and keyid='" + keyid + "'" 55."Select (select emailid from mst_question where surveyid=a.surveyid and quest ionid=a.questionid) as emailid,questionid,answerid from trn_answers a where surv eyid=" + surveyid + " and emailalert=1"

You might also like