Viewing 15 posts - 9,631 through 9,645 (of 10,144 total)
It's much easier to understand the second code sample posted, however:
1. The figure of 12 for the max substring length is arbitrary but should be >= the max string...
September 2, 2008 at 4:33 am
Sure.
This statement:
SELECT number
FROM Numbers
WHERE ... SUBSTRING(@String, number, 1) = @Delimiter
means "select rows from the Numbers (tally) table only where Numbers.number is equal to the character position of a...
September 2, 2008 at 3:51 am
harsha.bhagat1 (9/1/2008)
Thanks a million..It works..
Thank you so much..
🙂
You're welcome Harsha. Don't ya just love a happy customer? 😀
September 2, 2008 at 2:10 am
Here's another slightly different version which is easier to test and accounts for leading and trailing commas:
[font="Courier New"]CREATE PROCEDURE proc_Function_Explode_New2
(@Delimiter CHAR(1),
@String TEXT)
AS
DECLARE @StringLength INT
SET @StringLength = DATALENGTH(@String)
CREATE TABLE...
September 1, 2008 at 10:15 am
Its not the solution..
There is the problem what i found after working on it more today.
I am not able to split my text field. Today I found that the substring...
September 1, 2008 at 9:40 am
harsha.bhagat1 (9/1/2008)
That is my question only:)Thats me ..
Harsha Bhagat
Harsha Bhagat, if the proposed solution posted in your original thread fails to work for you, then why not post there, explaining...
September 1, 2008 at 9:21 am
harsha.bhagat1 (9/1/2008)
I...
September 1, 2008 at 8:53 am
Robert
SELECT CHARINDEX(@Delimiter, @String, @number)
will fail i.e. return 0, if @number exceeds 8000 characters.
Cheers
ChrisM
September 1, 2008 at 8:31 am
harsha.bhagat1 (9/1/2008)
The article is excellent and working on it I also gone into the problems facing text datatype .
But when you say use the substring , for me its is...
September 1, 2008 at 8:16 am
Of course you can use a tally table with text values.
This is ugly because you can't use CHARINDEX() with text values and it assumes that the max length of a...
September 1, 2008 at 5:56 am
GOD (8/29/2008)
Jus fill the values in the pivottable table and run de...
August 29, 2008 at 9:32 am
nairsanthu1977 (8/27/2008)
I have a master table called REQUEST. Each request may have been assigned to multiple employees. So I have another detail table where in there will...
August 28, 2008 at 1:09 am
Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx
August 28, 2008 at 12:59 am
Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx
August 28, 2008 at 12:57 am
Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx
August 28, 2008 at 12:56 am
Viewing 15 posts - 9,631 through 9,645 (of 10,144 total)