Sybase 11 - Array Emulation or Replace character in deliminated string


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Sybase 11 - Array Emulation or Replace character in deliminated string

Hybrid View

  1. #1
    John Guest

    Sybase 11 - Array Emulation or Replace character in deliminated string


    I am pulling my hair out trying to produce a efficient solution to a problem
    I have.

    I need to generate a SQL 'IN' statement on the fly in a stored procedure,
    I wanted to pass an array into the procedure to generate the IN statement
    but I don't believe this can be done. So instead I need to pass in some deliminated
    text, which cannot be comma deliminated! So please could some one suggest
    how I should replace my deliminator in SQL with a new deliminator so I can
    assign this to a new variable to be held in the IN statement!

    I would appreciate any suggestions anybody has!

  2. #2
    David Satz Guest

    Re: Sybase 11 - Array Emulation or Replace character in deliminated string

    Since SQL Server and Sybase were once one I will give you my standard SQL
    Server answer:
    http://www.mssqlserver.com/faq/development-array.asp
    also see http://www.algonet.se/~sommar/dynamic_sql.html

    --
    HTH,
    David Satz
    Principal Web Engineer
    Hyperion Solutions
    { SQL Server 2000 SP2/6.5 SP5a } { Cold Fusion 5 SP1 } { VSS }
    (Please reply to group only - emails answered rarely)
    -----------------------------------------------------------------
    "John" <john.bridle@marsh.com> wrote in message
    news:3cb182c9$1@10.1.10.29...
    >
    > I am pulling my hair out trying to produce a efficient solution to a

    problem
    > I have.
    >
    > I need to generate a SQL 'IN' statement on the fly in a stored procedure,
    > I wanted to pass an array into the procedure to generate the IN statement
    > but I don't believe this can be done. So instead I need to pass in some

    deliminated
    > text, which cannot be comma deliminated! So please could some one suggest
    > how I should replace my deliminator in SQL with a new deliminator so I can
    > assign this to a new variable to be held in the IN statement!
    >
    > I would appreciate any suggestions anybody has!




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center