If you want help and want to avoid wasting our time then it is better if you fully describe your question in the first post.
Look into the DateAdd functions. http://msdn.microsoft.com/en-us/library/ms186819.aspx http://www.devx.com/getHelpOn/10MinuteSolution/16528/1763/page/2 On Sep 16, 11:10 am, Carnage <[email protected]> wrote: > The Field is actually a date field that is based on other dates and > times.....80% of the time. In other instances, it is something the > person inputting the data simply guesses on and puts in > themselves...so it isn't ALWAYS a computed field. > > I did try it, but it didn't work. I was hoping there was something > syntax wise I could do different. > > On Sep 16, 9:50 am, The_Fruitman <[email protected]> wrote: > > > > > Try it and see if it works. > > > On a design note though, why would you want to store a computed field > > in a database. This is a waste of storage space. Review your design > > to see if there is a better way to do this. > > > On Sep 15, 11:26 pm, Carnage <[email protected]> wrote: > > > > Can you perform logic directly with Parameters in a SQL Query? > > > > Simple example would be something like This. You have a database > > > based on orders for Oranges, Apples, and Pears. A User will input the > > > Values for the three types of fruit and you want a fourth field > > > "Total_Fruit" to be filled in automatically. > > > > Would Something like... > > > > ' Update Orders set Oranges = @Oranges, Apples = @Apples, Pears = > > > @Pears, Total_Fruit = (@Oranges + @Apples + @Pears) where OrderID = > > > @OrderID" work? Or do you have to manipulate the logic using a > > > script? Or is there a completely different way to do something like > > > this that is generally better?- Hide quoted text - > > - Show quoted text -
