Click here to Skip to main content
15,892,927 members
Home / Discussions / Database
   

Database

 
GeneralRe: query Pin
Blue_Boy21-Jun-07 21:51
Blue_Boy21-Jun-07 21:51 
Questionhow to create stored procedure? Pin
Care Career21-Jun-07 20:12
Care Career21-Jun-07 20:12 
AnswerRe: how to create stored procedure? Pin
Krish - KP21-Jun-07 20:22
Krish - KP21-Jun-07 20:22 
QuestionExecuting Stored Procedure Pin
M. J. Jaya Chitra21-Jun-07 19:37
M. J. Jaya Chitra21-Jun-07 19:37 
AnswerRe: Executing Stored Procedure Pin
Krish - KP21-Jun-07 20:00
Krish - KP21-Jun-07 20:00 
Questionurgent need max of second record..., Pin
Member 387988121-Jun-07 18:13
Member 387988121-Jun-07 18:13 
AnswerRe: urgent need max of second record..., Pin
HemMagesh21-Jun-07 18:39
HemMagesh21-Jun-07 18:39 
GeneralRe: urgent need max of second record..., Pin
Krish - KP21-Jun-07 18:50
Krish - KP21-Jun-07 18:50 
DECLARE @nth as bigint
SET @nth = 10

SELECT * FROM TblA AS a WHERE @nth = (SELECT COUNT(ColA) FROM
TblB AS b WHERE b.ColA >= a.ColA)

This will return 10th Max.
change value of the variable @nth to get the required Max.


The same i've given earlier for finding Nth Max value
in your case assign 2 to @nth variable



Regards
KP

AnswerRe: urgent need max of second record..., Pin
Krish - KP21-Jun-07 18:48
Krish - KP21-Jun-07 18:48 
AnswerRe: urgent need max of second record..., Pin
Sathesh Sakthivel21-Jun-07 18:49
Sathesh Sakthivel21-Jun-07 18:49 
GeneralRe: urgent need max of second record..., Pin
Member 387988121-Jun-07 19:50
Member 387988121-Jun-07 19:50 
Answeryour right answer is here Pin
Sylvester george21-Jun-07 20:37
Sylvester george21-Jun-07 20:37 
QuestionSyntax Error in INSERT INTO Statement Pin
Cfer8321-Jun-07 6:08
Cfer8321-Jun-07 6:08 
QuestionRe: Syntax Error in INSERT INTO Statement Pin
Cfer8322-Jun-07 4:17
Cfer8322-Jun-07 4:17 
AnswerRe: Syntax Error in INSERT INTO Statement Pin
sidbaruah27-Jun-07 22:48
sidbaruah27-Jun-07 22:48 
QuestionDying on this query Pin
Hulicat21-Jun-07 4:16
Hulicat21-Jun-07 4:16 
AnswerRe: Dying on this query Pin
Krish - KP21-Jun-07 5:08
Krish - KP21-Jun-07 5:08 
AnswerRe: Dying on this query Pin
andyharman21-Jun-07 5:19
professionalandyharman21-Jun-07 5:19 
GeneralRe: Dying on this query Pin
Hulicat21-Jun-07 6:13
Hulicat21-Jun-07 6:13 
GeneralRe: Dying on this query Pin
andyharman22-Jun-07 0:40
professionalandyharman22-Jun-07 0:40 
GeneralRe: Dying on this query Pin
Hulicat22-Jun-07 2:02
Hulicat22-Jun-07 2:02 
AnswerRe: Dying on this query Pin
Michael Potter21-Jun-07 10:52
Michael Potter21-Jun-07 10:52 
GeneralRe: Dying on this query Pin
Hulicat21-Jun-07 13:23
Hulicat21-Jun-07 13:23 
GeneralRe: Dying on this query Pin
Michael Potter22-Jun-07 3:05
Michael Potter22-Jun-07 3:05 
GeneralRe: Dying on this query Pin
Hulicat22-Jun-07 16:06
Hulicat22-Jun-07 16:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.