Chandrashekar
7/27/2016 - 8:04 AM

Delete Questions By SourceId

Delete Questions By SourceId


delete qa from QuestionXActivity qa
inner join QuestionMaster qm on qm.QuestionId =qa.QuestionId
where qm.SourceQuestionId in (
		16768
		,16770
		,16773
		,16776
		,16777
		,16778
		,16779
		,16780
		,16781
		,16784
		,16785
		,16786
		,16787
		,16788
		,16789
		,16793
		,16797
		,16799
		,16800
		,16801
		,16803
		,16804
		,16805
		,16807
		,16809
		,16810
		,16811
		,16820
		,16821
		,16825
		,16830
		,16831
		,16838
		,16842
		,16843
		,16844
		,16847
		,16848
		,16851
		,16854
		,16855
		,16859
		,16865
		,16869
		,16871
		,16873
		,16874
		,16875
		,16877
		,16878
		,16880
		,16883
		,16886
		,16887
		,16888
		,16889
		,16895
		,16896
		,16897
		,16899
		,16900
		,16907
		,16912
		,16913
		,16914
		,16916
		,16918
		,16919
		,16920
		,16921
		,16922
		,16924
		,16926
		,16927
		,19826
		,19829
		,19831
		,19832
		,19833
		,19834
		,19835
		,19838
		,19843
		,19844
		,19846
		,19847
		,19848
		)

delete from QuestionMaster where SourceQuestionId in (
		16768
		,16770
		,16773
		,16776
		,16777
		,16778
		,16779
		,16780
		,16781
		,16784
		,16785
		,16786
		,16787
		,16788
		,16789
		,16793
		,16797
		,16799
		,16800
		,16801
		,16803
		,16804
		,16805
		,16807
		,16809
		,16810
		,16811
		,16820
		,16821
		,16825
		,16830
		,16831
		,16838
		,16842
		,16843
		,16844
		,16847
		,16848
		,16851
		,16854
		,16855
		,16859
		,16865
		,16869
		,16871
		,16873
		,16874
		,16875
		,16877
		,16878
		,16880
		,16883
		,16886
		,16887
		,16888
		,16889
		,16895
		,16896
		,16897
		,16899
		,16900
		,16907
		,16912
		,16913
		,16914
		,16916
		,16918
		,16919
		,16920
		,16921
		,16922
		,16924
		,16926
		,16927
		,19826
		,19829
		,19831
		,19832
		,19833
		,19834
		,19835
		,19838
		,19843
		,19844
		,19846
		,19847
		,19848
		)