AccessUser22
Technical User
Is there anyway to set DateFirst in a view? I am doing a series of invoicing views in which I sum up weekly employee info and then link it back in with it's daily data. There are about 5-6 query levels that I use to do this to satisfy different business rules for the invoicing. Problem is they want the weeks to start on Saturday instead of Sunday which I can do by setting DateFirst = 6. However, I can only do that in a stored proc. I need to do this at the initial level of the views in order to get the queries to run and total properly for each week. And since I can't reference a stored proc in a view or select data from it, I don't see how I'm supposed to use this.
Is there any way to use DateFirst in a view?
The only solution I can think of is to create a stored proc that sets the DateFirst = 6, gathers the invoice data for the period, and dumps the data into a temp table for the other queries to run off of. This stored proc would be executed first within my stored proc I use to run the invoice.
But is there a better way where I won't have to create a temp table at all? Anyone have any ideas?![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
Is there any way to use DateFirst in a view?
The only solution I can think of is to create a stored proc that sets the DateFirst = 6, gathers the invoice data for the period, and dumps the data into a temp table for the other queries to run off of. This stored proc would be executed first within my stored proc I use to run the invoice.
But is there a better way where I won't have to create a temp table at all? Anyone have any ideas?
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)