I need to write TSQL which gives the Result as below from Table A and Table B. Any help would be appreciated.
Table A :
LogId LogDate NumberOfRecords
1 1/1/2013 1000
1 1/5/2013 0
1 1/7/2013 10000
Table B :
LogId LogDate
1 1/1/2013
1 1/2/2013
1 1/3/2013
1 1/4/2013
1 1/5/2013
1 1/6/2013
1 1/7/2013
1 1/8/2013
Result:
LogId | LogId | NumberOfRecords |
1 | 1/1/2013 | 1000 |
1 | 1/2/2013 | 1000 |
1 | 1/3/2013 | 1000 |
1 | 1/4/2013 | 1000 |
1 | 1/5/2013 | 0 |
1 | 1/6/2013 | 0 |
1 | 1/7/2013 | 10000 |
1 | 1/8/2013 | 10000 |