Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Posts
    2

    Unanswered: Can you pass an array into a stored proc

    Can you pass an array into a stored proc or do we have to use indiviual parameters.

    If we can, any code exmaple woudl be great.

    Cheers
    Chris

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    no. but you can pass delimited values.
    Last edited by Thrasymachus; 03-09-06 at 18:09.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    47
    Google for SQL Server CSV and your answer is there
    http://www.google.com.sg/search?q=SQ...en-US:official
    -----------------
    KH


  4. #4
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    do you not pass an array parameter, but, you can use a temp table for this, example, you can create a table like this:

    CREATE TABLE [dbo].[myParameter] (
    [parID] [int] ,
    [parValue] [char] (40) ) ON [PRIMARY]
    GO

    afther this, you can insert your parameter in this table, and use in your SP, and drop the table.

  5. #5
    Join Date
    Dec 2002
    Posts
    1,245
    I saw something recently on sqlservercentral.com about using an xml string and OPENXML as a means to pass an array to a stored proc.

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •