Hi all,
I need a query immediately for the below requirement.
Please let me know if any issues on this.
Thank you.
Thanks & Regards
Venkata Ganesh Kumar Yerra
IRI - System Support Engineer
Phone : +9180-30272893 (Direct Line)
Mobile : +91- 9740221212
From: Pratt, Nigel [mailto:
Nigel...@infores.com]
Sent: Thursday, November 29, 2007 2:37 PM
To:
IRI-DSGDB
Cc: Amuthan Sebastian
Subject: Database problem to solve
Hi,
As part of the merging of items together for ILD we need to solve create some SQL to do the following.
Given three rows of data
|
1 |
101 |
5 |
10 |
20 |
5 |
|
|
|
2 |
106 |
|
20 |
10 |
4 |
|
6 |
|
3 |
102 |
|
20 |
|
3 |
|
|
The first column is the order of oldest to most recent data row.
The resulting row of data would be
|
3 |
102 |
5 |
20 |
10 |
3 |
|
6 |
Where we take the most recent row and for the other columns fill in the value that is the most recent value not null.
Please see if you can come up with some SQL that would generate this row from the three rows, it would really help us if you can figure this out. Please send me your ideas.
Thanks.
-Nigel