[dba-VB] [dba-SQLServer] Week Commencing Table (SQL Server 7.0)

paul.hartland at fsmail.net paul.hartland at fsmail.net
Tue Feb 17 04:58:59 CST 2004


To All,
 
I am trying to write a stored procedure in SQL Server 7.0, that when I pass a startdate and enddate to it it will populate a week commencing table, I know how to pass parameters etc to a SQL Server stored procedure and I have also written other INSERT stored procedures, but how do I create a loop in a stored procedure so that startdate increments by 7 days and inserts the new week commencing date until enddate is reached.  I was originally going to use Visual Basic to increment the dates then call the stored procedure each time the date incremented, but it would look a lot cleaner if I could achieve this in SQL Server itself.
 
Can anyone point me in the right direction (Again)
..
 
Thanks in advance for any help on this
..
 
Paul Hartland
Freeserve AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month 
www.freeserve.com/anytime
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com




More information about the dba-VB mailing list