Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
May be I am thinking wrong. please correct me.
I have this problem.
I have a Table for Example:
Contract:
Load
ContractID,
Valid From,
Valid To,
........,
......
From Contract Table;
Now I need to make a calendar and link to it. The Date which I am selecting in my Calendar must be lying between ValidFrom to
ValidTo of the contract. For Example Year = 2011, Month = May Day = 5 must show the Valid contracts.There are other Tables other than this contract.
Am I thinking right?
what are the different methods and how to do it?
what I was thinking is this:
1)Find the Min and Max Dates from ValidFrom and ValidTo Tables
2)Store in Variables.
3) Make a while Loop and generate Dates between ValidFrom and ValidTo
- Ex: 01.01.2011 to 31.12.2011
Now I get all the Dates as a Field Date
This Field Date must be also Joined to the Contract Table to get the connection for selection.
Now should I make a Common_Key of ValidFrom,ValidTo and Date Keys in Calendar and Contract Table with a LinkTable to select a Date or how it works?
Any Idea..
Regards
Sravan
This Contract Table is DimensionTable and this ContractId is also present in FactTable. Though No From and To for this contract in FactTable. Is it better to add the Calendar on the FactTable or the DimensionTable(Contract)?
Hi Sravan,
I won't mess around with variables when creating your link table - try using the IntervalMatch instead. IIRC there is a good example in help.
Regards,
Edgar