Advertisement

07.23.2008 at 12:17PM PDT, ID: 23589792
[x]
Attachment Details

Trigger on mssql

Asked by akiles99 in SQL Server 2005

Hi guys,
suppose i have a column name udate..

UDATE
1/7/2008 12:00:00 AM
3/29/2008 12:00:00 AM
6/10/2008 12:00:00 AM
4/11/2008 12:00:00 AM

I want to find the Year to Date for the current year....

If a set of sales occured before 1/1/2008, then it would not be part of this year to date sales.....
so for all sales(another column in same table) done between 1/1/2008 and 31/12/2008 i need a total?
then the  data would move to the field in another table (field anme: ULYRSALES )
 when the System date turned past 1/1/2009 etc using trigger........

Also triggers this to increment up by 1 day evry day that lapse past the last sale date

Cheers...
akilesStart Free Trial
 
Loading Advertisement...
 
[+][-]07.23.2008 at 12:31PM PDT, ID: 22072958

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Server 2005
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.24.2008 at 03:24AM PDT, ID: 22077542

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628