Stored procedure syntax

I am trying to combine two stored procedures I have but my syntax is wrong ... help ?

USE [BlueDotFinancial]
GO

/****** Object:  StoredProcedure [dbo].[Totalmonthlyexpenses]    Script Date: 08/15/2012 20:49:53 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[Monthlytotalbalance]
AS
BEGIN

(Select  SUM ((c.BDotcut)*a.qty)
from dbo.Subscriptions a
inner join Clients as b on a.clientid = b.Clientid
inner join Services as c on c.Serviceid = a.serviceid
WHERE c.billedon = 'm')  -
(Select SUM (amount) as TotalExpenses
from Expenses
WHERE recurring = 'm')

AS Balance

END
LVL 1
AleksAsked:
Who is Participating?
 
lwadwellCommented:
Select (Select  SUM ((c.BDotcut)*a.qty)
from dbo.Subscriptions a
inner join Clients as b on a.clientid = b.Clientid
inner join Services as c on c.Serviceid = a.serviceid
WHERE c.billedon = 'm')  -
(Select SUM (amount) as TotalExpenses
from Expenses
WHERE recurring = 'm') as balance
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.