such a way.. note that, there are no entries for 08/07/2010, 08/08/2010,08/14/2010, 08/15/2010 as they are weekends.
Now I need a table derived from this table such that, when I Give a date to query, It should give me a table,
with the dates starting from that month, till that date in one column and corresponding previous dates in next column.
Suppose, if choose 08/20/2010,
I need to write an TSQL statement such that, I need a a table this way:
I could write a query to give me previous date for a given date in this way:
Select trade_date from table1 where trade_date = (select max(trade_date) from table where trade_date < user_given_date)
If we give a date, this will retrieve the previous date in the table for that date.
But, I need the same to be replicated for the set of dates as stated above.