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 |
bradm77
Starting Member
6 Posts |
Posted - 2008-01-30 : 12:02:12
|
Ok, here is my problem. I have a report that gets generated to me in excel 2003 format. The problem with it is that it has merged cells. Column E has the employee name, column I has a pay code, column M has a date. I need to sort this (3000 rows) by column I, then M, but I cannot do that because of the merged cells. I created a DTS and got the whole thing into a sql table. What I want to do is go row by row through the table, looking at the value of column E. If the value of column E is null, then replace the null with the most recent non-null value of column E. I also need to do the same with column I. This would allow me to sort without orphaning anything. I TRIED to do a cursor in query analyzer but am having no success - any ideas, suggestions?here is a sample of the data:COLUMN E COL I COL K COL MBill Smith 8256 $1000 1/1/2008 $2500 1/10/2008 $800 1/17/2008Bill Smith 8509 $600 1/1/2008 |
|
|
|
|