Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need to replace attempt no(Urgent)

Author  Topic 

amit120k
Starting Member

16 Posts

Posted - 2013-01-15 : 00:26:36
I have result set like this:

TEST ID MODULE NAME TEST NAME Attempts No QUESTION USER ANSWER RIGHT ANSWER STATUS
------- ------------ ----------------------- ------------ ------------- ------------- ------------ -------
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 FT stands for? Fund Transfer Fund Transfer RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 In a day How many time you can do a Fund Transfer? Many Many RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 3 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 50 WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 4 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 5 WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 5 When you can perform the operation? Morning Hours WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 6 When you can perform the operation? All Day WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 FT stands for? Fund Transfer Fund Transfer RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 In a day How many time you can do a Fund Transfer? Many Many RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 3 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 100 WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 4 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 50 Rs 50 RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 5 When you can perform the operation? Morning Hours Morning Hours RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 6 When you can perform the operation? Night Hours WRONG

It should display like this:


TEST ID MODULE NAME TEST NAME Attempts No QUESTION USER ANSWER RIGHT ANSWER STATUS
------- ------------ ----------------------- ------------ ------------- ------------- ------------ -------
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 FT stands for? Fund Transfer Fund Transfer RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 In a day How many time you can do a Fund Transfer? Many Many RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 5 WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 When you can perform the operation? Morning Hours WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 1 When you can perform the operation? All Day WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 FT stands for? Fund Transfer Fund Transfer RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 In a day How many time you can do a Fund Transfer? Many Many RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 100 WRONG
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 What are the charges for doing a Fun transfer of 10,000 Rs.? Rs 50 Rs 50 RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 When you can perform the operation? Morning Hours Morning Hours RIGHT
0000A Fund Transfer(NEFT) Fund Transfer To Account 2 When you can perform the operation? Night Hours WRONG

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-15 : 00:32:00
whats the field based on which you want to do grouping and generate sequence?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

amit120k
Starting Member

16 Posts

Posted - 2013-01-15 : 01:34:36
Grouping will be based on [Attempt No].
Actually here Attempts are calculated based upon the [Test ID]
Here a person have taken test twice with the same number of questions
So The attempt no will be 1 for test taken first time
and attempt no will be 2 for test taken second time
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-15 : 03:05:59
gm..but all testids in given data have same value. then how do you determine which ones to get 1,2 etc? there's no date field to indicate test taken time

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -