sql query help needs :)

Status
Not open for further replies.

quad_master

Tired of being sorry!
need some help!!!:confused:
i try to display the top 2 rows of last 3 years every month!!! something like this:
yr month name
======= ========= ==========
2008 jan ram
. . .
. . .
2008 dec ram1
2007 jan ram2
. . .
. . .
2007 dec ram3
2006 jan ram4
. . .
. . .
2006 dec ram5

im using a VIEW(from where i get data) & sql server....
plzzzz somebody help me...

happy independance day!!
 

victor_rambo

हॉर्न ओके प्लीज़
I don't get it with what you posted above!
Give me a sample database structure and data.(give me in SQL form: CREATE TABLE... INSRRT INTO ....)
 
Last edited:

Bandu

Journeyman
I never worked with SQL Server, but SQL Server does support something like select top x

So, for you, won't a
Code:
Select top 2 from <YOUR_VIEW>
work?
 
Status
Not open for further replies.
Top Bottom