Chris,
create cursor AllDates( d1 d )
ldStart = some start date
ldEnd = some end date
do while ( ldStart <= ldEnd )
insert into AllDates values ( ldStart )
ldStart = ldStart + 1
enddo
select AllDates.d1, x.*
from AllDates ;
left join x ;
on AllDates.d1 = x.TheDate
null values in the x.* columns are missing dates
>I have a bunch of single letter codes for each date that I'm trying to string together, however the data may be missing dates for weekends and holidays. The result should look something like "ABBAC..CB.AA..BBAB....BACA"
>
>I can put the date, week, day of week, and letter code into an array with an SQL statement and walk the array - adding the weekend breaks seems easy, but I'm having difficulty with missing dates during the week. Can anyone help me with an algorithm or faster way to do this?