Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-04-29 : 22:41:35
|
speedguru writes "hi,
My requirement & the scenario are explained below
country date(mm/dd/yy) term IN 03/10/01 1 IN 03/20/01 2 IN 03/30/01 3 IN 04/10/01 1 IN 04/20/01 2
US 03/10/01 1 US 03/20/01 2 US 03/30/01 3 US 04/10/01 1
For each country there can be a max of 3 updations in a month ( in 3 intervals of 10 days). The 'term' for each updation will be 1, 2 and 3 for each month in the chronological order of date .
for instance , like this
country date(mm/dd/yy) term
IN 03/10/01 1 IN 03/20/01 2 IN 03/30/01 3
I wish to fetch the last 2 updations with respect to the current date.
So for country "IN" the following records must be fetched from the above table.
IN 04/10/01 1 IN 04/20/01 2
Similarly for country "US" the following records must be fetched.
US 03/30/01 3 US 04/10/01 1
hope it all makes sense
:-)" |
|
|
|
|
|