saving data in log table/report

A

anil

hi all
I have written a code to get weekly locations.In that code I uses a
temp table to do calculations and delete it.Because every week the
locations have to be different from last week.I am using 2-4-6 method
i.e select 2 from total 6 and in second week select 2 from remaining 4
so that i could not last week's 2.e.g i have total 6-- A,B,C,D,E,F
locations and in first week i select A,B and in next week I exclude A,B
and select C,D from remaining 4..In third week A,B come Back and C,D
are excluded and so on.Since I am using the final table to save e.g A,B
so next week it has to be updated with C,D and for that i have to
remove A,B.

Now problem is that I want to save the weekly locations e.g A,B from
week 1 and C,D from week 2 at some place so that even after 6 months i
would be able to see the locations that I have generated that
particular week.Since the Locations have to be different every week so
I delete them now but for record I need them.
IS there any method to save the weekly locations as Log table/Report in
database which is only for reference.
Second problem is that IS it possible to compare the log Table date
before running the code.I.E If I have generated the locations this week
then it will avoid me to generate locations 2nd time this week and ask
me to refer the log table generated before at particular date.
I hope I have explained the problems in proper way and the solution
will be possible.
thanks
anil
 
G

Guest

It seems to me that both your problems can be solved by designing a new table
structure. If you only have 6 venues You can create a transaction Table. Date
as the primary key and then :- venue, InDraw y/n, Selected y/n for each of
the 6 Venues and update that 1 new record each week. From code or query you
will get all the data and history you need along with warnings. If you expect
the venues to increase have a simple venu table linked to a transaction table.
I hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top