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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need to replace attempt no(Urgent)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

amit120k
Starting Member

India
16 Posts

Posted - 01/15/2013 :  00:26:36  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 01/15/2013 :  00:32:00  Show Profile  Reply with Quote
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

India
16 Posts

Posted - 01/15/2013 :  01:34:36  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 01/15/2013 :  03:05:59  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000