Advertisement

06.19.2008 at 07:03AM PDT, ID: 23498891
[x]
Attachment Details

add up in sql- can you do that?

Asked by pigmentarts in MS SQL Server, SQL Server 2005, SQL Server 2008

i want in the below sql to set a var which stores the total amount spent.  'o.orderTotal' holds a money value of each order
Start Free Trial
1:
2:
3:
4:
SELECT c.name, c.email, o.order_id, o.customerId, o.orderTotal, o.timedate
		FROM  customers c
		JOIN orders o ON c.email = o.customerId
        WHERE c.name = '#arguments.vname#'
[+][-]06.19.2008 at 07:13AM PDT, ID: 21822303

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

Zones: MS SQL Server, SQL Server 2005, SQL Server 2008
Sign Up Now!
Solution Provided By: elimesika
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.19.2008 at 07:17AM PDT, ID: 21822338

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]06.19.2008 at 07:53AM PDT, ID: 21822723

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_EXPERT_20070906