• Greetings Jeff,

    Sorry I did not reply for a bit. Been in a bit of a crunch month here at work. Your idea does sound good to me. From the StartDate, I can get the EndDate easily enough. I had also considered holding the Week ID if it was possible though. Especially since around the turn of the year the same week can easily belong to 2 different year periods. The only other reason I can currently think of for pulling the Week ID is that it can easily be fitted into a calculation for finding the invoice period. This usually follows a 4-4-5 type of pattern.

    This is an inherited database I am currently working on. I try to make changes to the structure, like adding columns, to make it better and faster. But, I also have to be carefull as the interface or reports will break if I make the wrong change. Much that I have learned has been self taught and the rest from the School Of Hard Knocks. So, being able to talk to you and others on this site is like a breath of fresh air. I am able to learn simple basics that I had never known before and ways to make a database better.

    I do have other questions about how to re-write some SQL scripts to make them better. But I am also held back by the sheer size of the scripts (several are well over 2,000+ lines) and the need to follow security rules and keep the data and database information safe and protected. If I had the chance to sit down with a few experts from this group and talk shop, I think that I would be able to find much better ways to design my scripts and where a lot of my mistakes are. Most of my working experience has been in windows application programming and design. Not in SQL design so my logic is a bit off. It still works thankfully, but I know that it could be much better.

    Thank you for your time.

    Terry Steadman

    P.S.

    Sorry for the rambling.:crazy: