Monday, October 20, 2014

stored procedure for displaying a value with the date range

Posted by Unknown  |  No comments


 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  

 USE [SMIC]  
 GO  
 /****** Object: StoredProcedure [dbo].[USP_GET_PLANNING_DETAILS]  Script Date: 09/09/2014 11:42:59 ******/  
 SET ANSI_NULLS ON  
 GO  
 SET QUOTED_IDENTIFIER ON  
 GO  
 -- =============================================  
 -- Author:     Gnani  
 -- Create date: 08/09/2014  
 -- Description:     get item wise QOH  
 -- =============================================  
 ALTER PROCEDURE [dbo].[USP_GET_PLANNING_DETAILS]  
      @ItemCode VARCHAR(100)  
      ,@FROMDate SMALLDATETIME  
      ,@TODate SMALLDATETIME  
           ,@Type INT  
 AS  
 BEGIN  
 IF (@Type =1)  
      select ISNULL(SUM(s.DocQty),0) AS StockQOH from RptStkBal as s inner Join MstITem i on i.ItemID=s.ItemID   
      where i.ITEMCODE=@ItemCode AND s.DocDate >=@FROMDate AND s.DocDate <=@TODate  
 END  

 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  


5:50 AM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top