|
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Srinath
-- Create date: May 22 2008
-- Description: Array Handling Sample
-- =============================================
CREATE PROCEDURE [dbo].[Sample_Array_Handling]
@SampleArray nvarchar(10)
AS
BEGIN
Create table #tempArrayTable (rid varchar(500))
Insert into # tempArrayTable (rid)
(select value from dbo.Split(@SampleArray,','))
DECLARE @ArrayItem nvarchar(100)
DECLARE @Array_Cursor CURSOR
SET @Array_Cursor = CURSOR FAST_FORWARD FOR select rid
from # tempArrayTable
OPEN @ Array_Cursor
FETCH NEXT FROM @ Array_Cursor INTO @ArrayItem
WHILE @@FETCH_STATUS = 0
BEGIN
print @ArrayItem
FETCH NEXT FROM @ Array_Cursor INTO @ArrayItem
END
Close Array_Cursor
deallocate Array_Cursor
END
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Srinath has done B.Tech from AWH Engineering College ,Calicut , Kerala, India. Currently working in Geodis @ Nashville, USA. He loves to working with Microsoft Technology.
Language / Technology :C#,VB.NET, ASP.NET, AJAX, XML, ADO.Net , WinForms, Javascript, JQuery, PL/SQL, Web Services , SQL Server 2000 & 2005.
Application Server : IIS 5.1, IIS 6.
Certification : IBM Certified Solution Implementer - WebSphere DataPower and MCP Web Client Development
Srinath's Articles:
View My CodeProject Articles