cancel
Showing results for 
Search instead for 
Did you mean: 

sa_split_list returns different result sets depending on delimiter

4,566

Using SA 11.0.1.2331

begin

declare @String varchar (100) ; 
set @String= 'a' ;

select * from sa_split_list(@string)

end 

returns

line_num,row_value
1,'a'

So far so good.

So why does

begin

declare @String varchar (100) ; 
set @String= 'a' ;

select * from sa_split_list(@string, '||')

end 

not return anything?

I can't see anything in the documentation that says non-default delimiters should behave differently.

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

AFAIK, this is a wrong behaviour fixed with 11.0.1.2381. From the readme.html for EBF 11.0.1.2427:

================(Build #2381 - Engineering Case #616395)================

The system procedure sa_split_list() did not work as expected when a multi-character delimiter was provided, and the string to be split was shorter than the delimiter. No rows were returned, whereas the expected result was a single row containing the string to be split. This has been fixed.

Thanks. To anyone from Sybase reading this: you have superb online help. Please think of consolidating EBFs into the online doc. Who's going to parse all EBFs unless they are a full-time DBA? This would make it SO MUCH easier to troubleshoot problems and work around version quirks

MarkCulp
Participant

@Vincent: EBFs are cumulative which means that you would only need to review one README file (i.e. the latest one) to see if there was a fix relating to an issue that you were having. We have had discussions about making the EBF READMEs available via dcx but I can't remember what the outcome was of that discussion? I will mention it again to the doc team.

VolkerBarth
Contributor
0 Kudos

@Vincent: In addition to Mark's comment: The fact that the newer EBF readmes (since about last year) can be filtered to list only the changes between build x and y makes looking for the relevant ones really easy - that is a great relieve IMHO. I'm at best a "quarter-time DBA" but scanning through the EBF readmes is worthwhile.

Answers (1)

Answers (1)

Former Member
0 Kudos

It works OK in the version 12 beta (build 2429). Are you using the latest build of version 11?

0 Kudos

I'm using 11.0.1.2331