Home > Archive > SQL Anywhere Feedback > December 2005 > UnList









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author UnList
Kjetil Valøy

2005-12-08, 7:24 am

UnList, DeList or ListToRecords

It would be good to have a function to do the opposit of what LIST
does. E.g. the string '1,4,3,7' would be parsed into singel records:
1
4
3
7

then I could write the following statement:

select "something" from ATable where FieldA in( UnList( '1,4,3,7' ) )


-- Kjetil Valøy --

David Fishburn

2005-12-08, 11:23 am

__no_spam__kjetil.valoy@iticket.no (Kjetil Valøy) wrote in
news:439819eb.1363764499@forums.sybase.com
of sybase.public.sqlanywhere. product_futures_disc
ussion:

nskv> UnList, DeList or ListToRecords
nskv>
nskv> It would be good to have a function to do the opposit of what LIST
nskv> does. E.g. the string '1,4,3,7' would be parsed into singel
records:
nskv> 1
nskv> 4
nskv> 3
nskv> 7
nskv>
nskv> then I could write the following statement:
nskv>
nskv> select "something" from ATable where FieldA in( UnList( '1,4,3,7' )
)

The "Jasper" release has sa_split_list which will do what you ask.

And CodeXchange has the same named routine (different implementation)
but it is available for the 9.x release:
http://ianywhere.codexchange.sybase...ctDocumentList?
folderID=282&expandFolder=282&folderID=0
sa_split_list procedure

So you have it both ways right now.

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Kjetil Valøy

2005-12-09, 7:23 am

That sound exelent!

They will probably implement it mor efficient than I can do.
Thanks for the link.

-- Kjetil --

On 8 Dec 2005 09:27:29 -0800, David Fishburn
<fishburn_spam@off.ianywhere.com> wrote:

>__no_spam__kjetil.valoy@iticket.no (Kjetil Valøy) wrote in
>news:439819eb.1363764499@forums.sybase.com
>of sybase.public.sqlanywhere. product_futures_disc
ussion:
>
>nskv> UnList, DeList or ListToRecords
>nskv>
>nskv> It would be good to have a function to do the opposit of what LIST
>nskv> does. E.g. the string '1,4,3,7' would be parsed into singel
>records:
>nskv> 1
>nskv> 4
>nskv> 3
>nskv> 7
>nskv>
>nskv> then I could write the following statement:
>nskv>
>nskv> select "something" from ATable where FieldA in( UnList( '1,4,3,7' )
> )
>
>The "Jasper" release has sa_split_list which will do what you ask.
>
>And CodeXchange has the same named routine (different implementation)
>but it is available for the 9.x release:
>http://ianywhere.codexchange.sybase...ctDocumentList?
>folderID=282&expandFolder=282&folderID=0
>sa_split_list procedure
>
>So you have it both ways right now.
>
>--
>David Fishburn
>Certified ASA Developer Version 8
>iAnywhere Solutions - Sybase
>Professional Services
>Please only post to the newsgroup
>Please ALWAYS include version and MORE importantly BUILD number with
>EACH post (dbeng9 -v).
>
>EBFs and Maintenance Releases
>http://downloads.sybase.com/swx/sdmain.stm
>
>Developer Community / Whitepapers
>http://www.ianywhere.com/developer
>
>CaseXpress - to report bugs
>http://casexpress.sybase.com
>
>CodeXchange - Free samples
>[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com