question

Haren avatar image
Haren asked

store procedure error

Hello, I am new to the Sql, I have written store procedure to calculate stock, it works fine in sql server, but when i use it in crystal report, gives an error "Rm_stock_summ" syntax error Please help Following is the code set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[Rm_Stock_Summ] @FromProdCode int, @ToProdCode int, @FromGroupCode int, @TogroupCode int AS BEGIN SET NOCOUNT ON; Select Product_code,Product_Name,Product_Master.ProductGroup_Code,ProductGroup_Master.ProductGroup_Name , ( select isnull(sum(opening_stock),0) from opening_stock where Product_master.Product_code = Opening_stock.Product_code ) as Ope_Qty , ( Select isnull(sum(Quantity),0) From Issue_detail Where Product_Master.Product_Code = Issue_detail.Product_code ) as Issue_Qty, (Select isnull(Sum(Quantity),0) from Purchase_Detail Where Product_Master.Product_Code=Purchase_Detail.Product_Code ) as Receipt_Qty from product_master INNER JOIN ProductGroup_Master ON Product_master.ProductGroup_code= ProductGroup_Master.ProductGroup_code ORDER BY Product_Master.ProductGroup_Code,Product_Master.Product_Code END
sql-serverstored-procedurescrystal-report
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Usman Butt avatar image Usman Butt commented ·
How are you using it in the crystal reports? Please specify.
4 Likes 4 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.