Dear All,I am in great trouble. I am having 2 Tables: QuestionPaper & Employee.The QuestionPaper is having following details:--------------------------------QuestionID | ExamID | SectionID--------------------------------232 | 18 | 20233 | 18 | 20234 | 18 | 20235 | 18 | 20236 | 18 | 20237 | 18 | 20238 | 18 | 20239 | 18 | 20240 | 18 | 20241 | 18 | 20262 | 18 | 21263 | 18 | 21264 | 18 | 21265 | 18 | 21266 | 18 | 21267 | 18 | 21268 | 18 | 21269 | 18 | 21270 | 18 | 21271 | 18 | 21292 | 18 | 22293 | 18 | 22294 | 18 | 22295 | 18 | 22296 | 18 | 22297 | 18 | 22298 | 18 | 22299 | 18 | 22300 | 18 | 22301 | 18 | 22--------------------------------
and the Employee table contains:---------------ExamID | EmpID--------------- 18 | 119 18 | 219 18 | 359 18 | 297 18 | 384 18 | 245 18 | 117 18 | 269---------------
Now from the Above 2 tables, I have to create a T-SQL, which will assign 5 Unique QuestionID RANDOMLY as per SectionID and ExamID to each EmpID, e.g.----------------------------------------ExamID | EmpID | SectionID | QuestionID---------------------------------------- 18 | 119 | 20 | 233 18 | 119 | 20 | 237 18 | 119 | 20 | 232 18 | 119 | 20 | 241 18 | 119 | 20 | 239 18 | 119 | 21 | 262 18 | 119 | 21 | 269 18 | 119 | 21 | 265 18 | 119 | 21 | 268 18 | 119 | 21 | 263 18 | 119 | 22 | 301 18 | 119 | 22 | 299 18 | 119 | 22 | 297 18 | 119 | 22 | 295 18 | 119 | 22 | 293 18 | 219 | 20 | 236 18 | 219 | 20 | 233 18 | 219 | 20 | 241 18 | 219 | 20 | 232 18 | 219 | 20 | 239 18 | 219 | 21 | 265 18 | 219 | 21 | 266 18 | 219 | 21 | 267 18 | 219 | 21 | 268 18 | 219 | 21 | 269 18 | 219 | 22 | 292 18 | 219 | 22 | 294 18 | 219 | 22 | 296 18 | 219 | 22 | 298 18 | 219 | 22 | 300----------------------------------------
Hope I can make you understand my query, please help.Regards,DaipayanSoftware Programmer
Application has reported a 'Not My Fault' in module KRNL.EXE in line 0200:103F