Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8368

Re: Getting CR to display fields from stored procedure

$
0
0

Hi Doug,

 

Here is a basic SP in SQL Server:

 

USE [xtreme]

GO

/****** Object:  StoredProcedure [dbo].[CustOrderHist]    Script Date: 06/10/2014 13:17:15 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

 

ALTER PROCEDURE [dbo].[CustOrderHist] @CustomerID nchar(5)

AS

SELECT Product ID, ProductName, Total=SUM(Quantity)

FROM Products P, [Order Details] OD, Orders O, Customers C

WHERE C.CustomerID = @CustomerID

AND C.CustomerID = O.CustomerID AND O.OrderID = OD.OrderID AND OD.ProductID = P.ProductID

GROUP BY ProductName

 

Imported the xtreme.mdb from our old samples....

 

Make sure the last SELECT Statement is where the data exists also.

 

Don


Viewing all articles
Browse latest Browse all 8368

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>