TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maneesh A N
NA
179
109.2k
SUMMING COLUMNS
Sep 3 2013 2:42 AM
ALTER PROCEDURE[dbo].[prctblExpenseMasterDetailsView]
(
@iAccID int,
@FromDate DateTime,
@ToDate DateTime
--@dInvoiceDate datetime
)
AS
SET NOCOUNT ON
BEGIN
SELECT
TS.iAccID as iAccID,
TS.vAccName as Name,
SUM(SI.vItemName) as Item,
SUM(SI.iNos) as Qty,
SI.deRate as Rate,
SUM(SI.deAmount) as Amount,
SUM(TS.dInvoiceDate) as Date
FROM tblSales TS INNER JOIN tblSalesItem SI ON TS.iSalesID=SI.iSalesID
where
TS.iAccID=@iAccID AND TS.dInvoiceDate>=@FromDate and dInvoiceDate<=@ToDate
END
I NEED TO SUM CERTAIN ABOVE MENTIONED COLUMNS .PLEASE GIVE CORRECT CODE WITH INNER JOIN
Reply
Answers (
7
)
arraylist
date to sum