Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Passing a list to an Oracle stored procedure

Explorer ,
May 07, 2010 May 07, 2010

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?

609
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2010 May 08, 2010
LATEST

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

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources