SQL Server Performance

SP to Insert

Discussion in 'SQL Server 2008 General Developer Questions' started by rajeshnrh74, Jan 13, 2011.

  1. rajeshnrh74 New Member


    Am developing an ASP.net based Web appln. with SQL Server 2008 as my backend.
    In aspx page I have 2 listbox controls as below.

    ListBox1 ListBox2
    View1 Expression1

    My requirement is I need a stored procedure to insert those listbox items into a table.
    Table should like as below...

    View Name Expressions Name
    View1 Expression1
    View1 Expression2
    View1 Expression3
    View1 Expression4

    Pls. provide me a solution

    Thanks in Advance.
  2. satya Moderator

  3. Madhivanan Moderator

    Something like
    for i=0 to ListBox2.listcount
    sql="insert into table (cols) select "&list1.listitem(1)&","&list2.listitem(i)

Share This Page