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 2000 Forums
 SQL Server Development (2000)
 Replace Null values... without Coalesce?

Author  Topic 

Xenlpe
Starting Member

8 Posts

Posted - 2001-11-02 : 08:00:30
Hi people.
I have a problem: I have a table with dates (ID, Date, ValueX). Every month this table gets a new record, on the first day of the month for the previous month. ID And Date are set automatically, but not ValueX, which comes from another query. Sometimes this query returns NULL, that means, no sales or no contacts or no whatever during the month.
When I make a select I get something like:


ID Date ValueX
--------------------------------
1 01/01/2000 1000
2 02/01/2000 1923
3 03/01/2000 NULL
4 04/01/2000 NULL
5 05/01/2000 1372
6 06/01/2000 1722


Which is ok, but how can I get, instead of the NULL, the last not-null Value? (in this case, Show 1923 on March and April)

Thanks
   

- Advertisement -