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.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Missing values - how to replace them?

Author  Topic 

queezer
Starting Member

1 Post

Posted - 2009-05-04 : 11:50:46
Hi everyone. My question is very simple but i think that the answer might be a little more difficult.

Basically I have a table with 52 columns and 1,8 million rows.
The 1st column is "date" (dailly from 30-09-2007 up to today) and the 2nd is CustomerID (about 4.000 customers). Since i did a left join, i got some missing values.

My aim is to fill the null fields with the last available information of each column of each customer, meaning that I want the LAST NON MISSING VALUE OF THAT CUSTOMER.

How can I do it?
Thx,
Manuel

malaytech2008
Yak Posting Veteran

95 Posts

Posted - 2009-05-04 : 13:08:00
Can you provide sample data of the tables you are using for left join and the data you try to retrieve previous data from which table.

malay
Go to Top of Page
   

- Advertisement -