Hi,
i want 2 and 3 rd max salary in a table .i want a single query.
please help..
Arun
70 6214
Hi,
i want 2 and 3 rd max salary in a table .i want a single query.
please help..
Arun
I have used the inline view concept for this
Query for nth max salary :
select s.salary from
(
(
select dense_rank() over (order by max(salary) desc) n,salary
from
employee
) s
)
where s.n=&n;
Below will return n,n+1 higest salary of a table.
select min(salary) sal
from
( select salary from employee order by salary desc)
where rownum<=&n
union
select min(salary) sal
from
( select salary from employee order by salary desc)
where rownum<=&n+1
Dear
mailtothiyagara jan
have u tested the code before posting
select sal from (select sal from emp order by sal desc) where rownum in(2,3)
Dear friends,
I known about pre defined exception:
i want a sample programs in each of predefined exception.
example:
invalid cursor :
one sample program. when exception is raised in ivvalid cursor
same as others exceptions...
pls anybody help....
arun..
Dear debas,
Can u explain about sql tuning:
what are the steps are doing sql tuning . I want to know about basic ideas
in sql tuning and performance tuning. what are the types?..
Pls...
Arunkumar...
PLease follow this Link
Hope it might be useful for u.
Invalid cursor exception is raised when u try to do somthing which is not allowed .
for ex
accesing the cursor variable after the cursor is closed.
ZERO_DIVIDE exception
=============== ======== -
DECLARE
-
I INT:=&I;
-
J INT:=&J;
-
K INT;
-
BEGIN
-
K:=I/J;
-
DBMS_OUTPUT.PUT_LINE(K);
-
EXCEPTION
-
WHEN ZERO_DIVIDE THEN
-
RAISE_APPLICATION_ERROR(-20002,'CANT DIVIDE BY ZERO.....!');
-
WHEN OTHERS THEN
-
RAISE_APPLICATION_ERROR(-20003,'SOME OTHER ERROR........!');
-
END;
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Materialised |
last post by:
I have been given the task, of developing a program to sit next to a cgi
based c program (I know this is offtopic but my question does only refer
to the standard c part of the code).
Basically what the program needs to do, is open a text file, containing
hundreds maybe even thousands of items, and remove duplicate items.
Also if the line length exceds a certian amount of characters, I wish to
remove it.
I was thinking of using malloc...
|
by: softwareengineer2006 |
last post by:
All Interview Questions And Answers
10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP)
I have listed over 10000 interview questions asked
in interview/placement test papers for all companies between year
2000-2005
in my website
http://www.geocities.com/allinterviewquestion/
So please have a look and make use of it.
|
by: connectrajesh |
last post by:
INTERVIEWINFO.NET
http://www.interviewinfo.net
FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES
NO ADVERTISEMENT
|
by: freepdfforjobs |
last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions
http://www.questpond.com/SampleInterviewQuestionBook.zip
Download the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of
attending interviews. If you own a company best way to judge if the
candidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
|
by: Drew |
last post by:
I posted this to the asp.db group, but it doesn't look like there is much
activity on there, also I noticed that there are a bunch of posts on here
pertaining to database and asp. Sorry for cross-posting.
I am trying to build a "checklist", where a user can navigate to an ASP page
on the intranet which shows a list of "questions" that the user can check
off. I am trying to figure out how to do this so that it is scalable, but I
am...
| |
by: sqlservernewbie |
last post by:
Hi Everyone,
Here is a theoretical, and definition question for you.
In databases, we have:
Relation
|
by: Krypto |
last post by:
Hi,
I have used Python for a couple of projects last year and I found it
extremely useful. I could write two middle size projects in 2-3 months
(part time). Right now I am a bit rusty and trying to catch up again
with Python.
I am now appearing for Job Interviews these days and I am wondering if
anybody of you appeared for a Python Interview. Can you please share
the questions you were asked. That will be great help to me.
|
by: Joseph Ferris |
last post by:
Good afternoon,
I understand the basic theories of capacity planning as it relates to
profiling an existing web site, such as in the examples given in the
MSDN Article, "How To: Perform Capacity Planning for .NET
Applications" http://msdn2.microsoft.com/en-us/library/
ms979198.aspx]. This assumes the existence of an application to
profile, though.
What is a good way to perform a more abstract, theoretical assessment
|
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |