Monday, October 20, 2014

stored procedure select

Posted by Unknown  |  No comments

 --Stored procedure for top 100 records base on letter  
 --==========================================  
 USE [SMIC]  
 GO  
 /****** Object: StoredProcedure [dbo].[USP_GET_PLANNING]  Script Date: 09/09/2014 11:44:22 ******/  
 SET ANSI_NULLS ON  
 GO  
 SET QUOTED_IDENTIFIER ON  
 GO  
 -- =============================================  
 -- Author:   gnani  
 -- Create date: 20/08/2014  
 -- Description:     [dbo].[USP_GET_PLANNING]  
 -- =============================================  
 ALTER PROCEDURE [dbo].[USP_GET_PLANNING]  
      @Itemcode varchar(15)  
      ,@Type INT   
 AS  
 BEGIN  
 IF (@Type =1)  
      BEGIN  
           SELECT TOP 100 ITEMCODE FROM MstITEM WITH(NOLOCK) WHERE ITEMCODE LIKE @Itemcode+'%' ORDER BY ITEMCODE  
      END  
 END  

6:01 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