Fill gaps in rates data with previous working day rates.
-
Hi, I have sql server table containing dates,currency and rates. For non working dates we dont get rates data, so I need a stored proc to fill these gaps. for example: for Saturday and Sunday, rates data is not received, so for Sat and Sun data with rates of previous working days i.e. Friday should be entered. Same is the case with public holidays also. Please provide me with some sample proc. Any help is appreciated!
-
Hi, I have sql server table containing dates,currency and rates. For non working dates we dont get rates data, so I need a stored proc to fill these gaps. for example: for Saturday and Sunday, rates data is not received, so for Sat and Sun data with rates of previous working days i.e. Friday should be entered. Same is the case with public holidays also. Please provide me with some sample proc. Any help is appreciated!
Devesh Sinha wrote:
Please provide me with some sample proc.
Asking for the codez is just lazy. You need to decide if you want linier interpolation or a copy forward methodology. Both are very simple comparing the friday and monday rates and creating the new records as required.
Never underestimate the power of human stupidity RAH