How to pass a comma separated list to a stored procedure?

前端 未结 11 2060
情书的邮戳
情书的邮戳 2020-12-10 01:32

So I have a Sybase stored proc that takes 1 parameter that\'s a comma separated list of strings and runs a query with in in an IN() clause:

CREATE PROCEDURE          


        
11条回答
  •  孤街浪徒
    2020-12-10 02:11

    Not sure if it's in ASE, but in SQL Anywhere, the sa_split_list function returns a table from a CSV. It has optional arguments to pass a different delimiter (default is a comma) and a maxlength for each returned value.

    sa_split_list function

提交回复
热议问题