Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
XXOmar
Starting Member
1 Post |
Posted - 2011-10-05 : 18:31:39
|
Here is what it is required. In a given time period regional pricing overrides national pricing. With the data that I currently got there are overlaps. I need to create a function in Excel or SQL that helps me modify date records ( both VALID FROM and VALID TO ), and assign the right price with the correct timeframe (wo overlaps). Any ideas?Type PROV VALID_FROM VALID_TO PRICENational QC 01-Jan-00 31-Aug-04 38National QC 01-Sep-04 16-Oct-07 32.37Regional QC 17-Oct-07 18-Dec-07 32.37National QC 17-Oct-07 31-Dec-99 32.37Regional QC 19-Dec-07 31-Jan-08 20.23Regional QC 01-Feb-08 16-Dec-10 16.185Regional QC 17-Dec-10 31-Jan-11 12.57Regional QC 01-Feb-11 19-Apr-11 12.565Regional QC 20-Apr-11 31-Dec-99 10.06 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-06 : 01:19:35
|
so what should be your output from above data?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|