Results 1 to 10 of 10

Thread: [RESOLVED] Stored Procedure, how would you approach this?

Threaded View

  1. #1

    Thread Starter
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    Resolved [RESOLVED] Stored Procedure, how would you approach this?

    Hi,

    in my projects I keep all my queries inside my database as stored procedures. one of the biggest problems with SP (in my opinion) is the lack of dynamically when using them, anyway so far i manage to handle this problem but now i came to a dead end, in one of my project pages i have to create a unknown number of INSERT statements, i know i can create one INSERT statement and call it x number of times, but for performance reasons I need to write the INSERT statement as follow (this is MySql Syntax but i think MSSQL is almost the same):

    Code:
    INSERT(column1,column2)VALUES(value1,value2),(value1,value2) ...
    where there can be any number of values ... is there a good approach for this kind of operation using SPs ?

    Thanks!
    Last edited by motil; Apr 12th, 2010 at 10:03 AM.
    * Rate It If you Like it

    __________________________________________________________________________________________

    "Programming is like sex: one mistake and you’re providing support for a lifetime."

    Get last SQL insert ID

Posting Permissions

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



Click Here to Expand Forum to Full Width