March 20, 2012 at 12:39 am
Hi i'm a newby,
i ' ll change a view to a procedure. My Parameter-List dosn't work with my Procedure. I need help please.
March 20, 2012 at 1:47 am
Please read through this:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
The above guidelines will enable us to assist you better and faster.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
March 20, 2012 at 8:22 am
my problem resolved by a split function
ALTER FUNCTION [dbo].[fn_Split](@delimiter VARCHAR(MAX), @s VARCHAR(MAX))
RETURNS
@table TABLE (Word VARCHAR(MAX))
AS
BEGIN
DECLARE @i INT, @j INT
SET @j = 0
SET @i = CHARINDEX(@delimiter, @s)
WHILE @i > 0
BEGIN
INSERT INTO @table(Word) VALUES(SUBSTRING(@s, @j+1, @i-@j -1))
SET @j = @i
SET @i = CHARINDEX(@delimiter, @s, @i+1)
END
INSERT INTO @table(Word) VALUES (SUBSTRING(@s, @j+1, LEN(@s) - @j))
RETURN
END
thank you for assistance
March 20, 2012 at 8:59 am
If you want an even faster splitter...and I mean orders of magnitudes faster...take a look at the second link in my signature. It explains why looping structures are horribly inefficient for splitting strings like this.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply