Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!proxad.net!64.233.160.134.MISMATCH!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail
From: "max" <cccp.forever@gmail.com>
Newsgroups: comp.databases.oracle.misc
Subject: Multiple updates w. static SQL vs. single dynamic SQL update
Date: 7 Jul 2006 15:07:33 -0700
Organization: http://groups.google.com
Lines: 23
Message-ID: <1152310053.924089.235910@m73g2000cwd.googlegroups.com>
NNTP-Posting-Host: 66.239.125.66
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1152310060 32554 127.0.0.1 (7 Jul 2006 22:07:40 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 7 Jul 2006 22:07:40 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: m73g2000cwd.googlegroups.com; posting-host=66.239.125.66;
   posting-account=hJqIzQ0AAABJx3pdaDWvuPxsncIpmzkF
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:128376

Hi,

What would be better (faster):

1.have a stored procedure loop thru a list of values and execute a
statement:

           update customers
                set active = 1
            where customer_code = value

2. create a comma delimited string of values like so:

   list := value1 || ',' || value2 || ',' || value3....

   and using it in a dynamic SQL like so:

        v_sql =  'update customers
                           set active = 1
                       where customer_code in ( ' || list || ')'

Thanks.

