Skip to main content
Inspiring
May 7, 2010
Question

Passing a list to an Oracle stored procedure

  • May 7, 2010
  • 1 reply
  • 630 views

Anyone know how to process the list?

<cfstoredproc  procedure="test" datasource="#application.Datasource#">
    <cfprocparam type="in" cfsqltype="cf_sql_varchar" value="#Names#">
  </cfstoredproc>

procedure test (Names in varchar2) is

The Names variable from the Cold Fusion page would have values like Joe1,Joe2,Joe3,Joe4.

I need to loop through the Names variable (Joe1 then Joe2 then Joe3 and so on) and insert each one into a table.  Any idea on how to do that within the procedure?

    This topic has been closed for replies.

    1 reply

    Inspiring
    May 8, 2010

    For the Cold Fusion part, you'll have to put quotes around each list item.

    For the oracle part, google "oracle stored procedure loop".