Click here to Skip to main content
15,890,282 members
Home / Discussions / Database
   

Database

 
GeneralReading xml inside stored procedure Pin
saurabhmind29-Apr-08 4:12
saurabhmind29-Apr-08 4:12 
GeneralRe: Reading xml inside stored procedure [modified] Pin
Blue_Boy29-Apr-08 4:36
Blue_Boy29-Apr-08 4:36 
GeneralRe: Reading xml inside stored procedure Pin
saurabhmind29-Apr-08 22:33
saurabhmind29-Apr-08 22:33 
GeneralReporting Best Practises (Are there any what do you do?) Pin
GDMFSOB29-Apr-08 0:10
GDMFSOB29-Apr-08 0:10 
GeneralRe: Reporting Best Practises (Are there any what do you do?) Pin
Youtea1-May-08 16:57
Youtea1-May-08 16:57 
GeneralSelecting the latest records Pin
Kevin Brydon28-Apr-08 23:27
Kevin Brydon28-Apr-08 23:27 
GeneralRe: Selecting the latest records Pin
Blue_Boy28-Apr-08 23:55
Blue_Boy28-Apr-08 23:55 
GeneralRe: Selecting the latest records Pin
Harini N K29-Apr-08 0:13
Harini N K29-Apr-08 0:13 
Hi

Try this:

SELECT<br />
	Organization,<br />
	[Report Year],<br />
	[Income],<br />
	[Expenditure]<br />
FROM <br />
	Table1 a <br />
WHERE [Report Year] >=<br />
		(<br />
		SELECT TOP 1 <br />
			[Report Year]<br />
		FROM <br />
			Table1 b <br />
		WHERE <br />
			a.Organization = b.Organization <br />
		ORDER BY [Report Year] DESC<br />
		)<br />
ORDER BY <br />
	Organization


Hope you are getting results as expected.

Harini

GeneralRe: Selecting the latest records Pin
Kevin Brydon30-Apr-08 6:45
Kevin Brydon30-Apr-08 6:45 
GeneralRe: Selecting the latest records Pin
Blue_Boy30-Apr-08 10:16
Blue_Boy30-Apr-08 10:16 
GeneralLimit Rows in DataTable Pin
Brady Kelly28-Apr-08 23:15
Brady Kelly28-Apr-08 23:15 
QuestionSelecting 3 columns and merging??? Pin
Karan_TN28-Apr-08 21:46
Karan_TN28-Apr-08 21:46 
GeneralRe: Selecting 3 columns and merging??? Pin
Blue_Boy28-Apr-08 22:07
Blue_Boy28-Apr-08 22:07 
GeneralRe: Selecting 3 columns and merging??? Pin
Karan_TN28-Apr-08 22:32
Karan_TN28-Apr-08 22:32 
GeneralRe: Selecting 3 columns and merging??? Pin
Blue_Boy28-Apr-08 22:37
Blue_Boy28-Apr-08 22:37 
GeneralRe: Selecting 3 columns and merging??? Pin
Karan_TN28-Apr-08 22:54
Karan_TN28-Apr-08 22:54 
GeneralRe: Selecting 3 columns and merging??? Pin
Blue_Boy28-Apr-08 23:46
Blue_Boy28-Apr-08 23:46 
GeneralRe: Selecting 3 columns and merging??? Pin
Karan_TN29-Apr-08 0:10
Karan_TN29-Apr-08 0:10 
GeneralRe: Selecting 3 columns and merging??? Pin
Blue_Boy29-Apr-08 2:55
Blue_Boy29-Apr-08 2:55 
AnswerRe: Selecting 3 columns and merging??? Pin
Karan_TN29-Apr-08 21:39
Karan_TN29-Apr-08 21:39 
GeneralRe: Selecting 3 columns and merging??? Pin
Blue_Boy29-Apr-08 21:41
Blue_Boy29-Apr-08 21:41 
GeneralRe: Selecting 3 columns and merging??? Pin
Karan_TN1-May-08 22:44
Karan_TN1-May-08 22:44 
GeneralRe: Selecting 3 columns and merging??? Pin
Blue_Boy1-May-08 23:40
Blue_Boy1-May-08 23:40 
QuestionSql Server Security Pin
~V~28-Apr-08 21:25
~V~28-Apr-08 21:25 
GeneralRe: Sql Server Security Pin
Blue_Boy28-Apr-08 21:49
Blue_Boy28-Apr-08 21:49 

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.