I did like this
I create a table
OBJID as Key2,
PlS as Key3,
OBJID as Key2,
PlS as Key4,
and connect to the secondvariable of the previousyear VDatepreviousyear and done the same procedure..
I think as the key1 in the table1 is not same I have a problem..How can I generate 2 fields and connect it with the Datamodel of the presentyear and also to the datamodel of the Previousyear?
I hope I did explain in Detail...
I'm not sure if I totally understand your data structure. However, the simple answer to your question is just to do a second set of loads and concatenate them onto the relevant tables, or consider if the query:
field X.BEGDATE<=VDatePrevyear or field X.ENDDATE >=vDate
Will work for you.
I am also wondering if your begin date and end dates need to be separate in all the tables? If they are common to the Key, maybe have one table with all the values concatenated - Key1, BEGDATE, ENDDATE - and then you can use an Interval Match to create a calendar table linked to both date fields.
The problem is not very clear, but from what I understood I have few suggestions:
Why do you need to create separate model for current and previous years? You could create just one model and add some kind of flag to distinguish between current and previous year. Hope this is of some help...if the problem is something else, please provide more details (if possible with an example).
Second set of loads I added as shown above but the Problem is I have to have a different Key for my second loads otherwise the Presentyearkey will collide..
Ya begin and Enddates should be separate in all the tables bcos there are thousands of them and are distinct for each Person.
I create seperate models bcos the second set of model ist compared to a variable vDatepreviousyear and the first set of Model is compared to vDatepresent
I have a routine in
where according to the preferred variable and selected tables
for ex first set with vDatepresent = 31.12.2008 I compare the BEGDATE and ENDDATE of the tables
Table1, Table2, Table3,Table4... whether they are <= or >= 31.12.2008 and all others are excluded which do not fall in to the category..
In the sameway I compare in another routine where vDatepreviousyear =31.12.2007 the BEGDATE and ENDDATE of the tables
I hope I was clear in my explanation..