[thelist] sql help

Richard Bennett richard.b at gritechnologies.com
Fri Sep 12 14:23:36 CDT 2003


Hi,

I could use some help creating a view in mssql:

There's a table: date, user and status .
It keeps a record as a user's status changes over time.

2003/09/01  user1  100
2003/09/04  user1  200

Now I'm trying to join this to a list of all the days in the month, to show
the user's status at that time:

2003/09/01  user1  100
2003/09/02  user1  100
2003/09/03  user1  100
2003/09/04  user1  200
2003/09/05  user1  200
2003/09/06  user1  200
2003/09/07  user1  200
2003/09/08  user1  200

Of course I get a <null> on all days except 01 and 04 when I use a regular
join.
Any idea how I can use the last available value, if the date doesn't have a
value of it's own?

Thank,
Richard.

PS, Does anyone know how to switch off the irritating popup warning that it
wants to clear your preview data in mssql?



More information about the thelist mailing list