I try to avoid dynamic sql unless there's no other way, I mean like
really, really really no other way, it's hard for those who follow you
to debug and maintain and you can have problems if for example data or a
variable simply has quote characters in the data in it...among many
other things. I am to the point where I would even change table design
or anything else to avoid them. What seems so simple actually winds up
causing a lot of head aches down the road. The string argument would be
execute immediate type of statement appropriate to the version of oracle
you have...but they can take advantage of a problem in 9i and 10g for
which there exists an oracle critical patch (fall 05?).
slc
-----Original Message-----
From: Qi cheng
[mailto:oracledba-ezmlmshield-x24334282.[Email address protected]
Sent: Monday, April 30, 2007 11:50 AM
To: LazyDBA Discussion
Subject: any sample code for cursor
a developer need to create a function, pass sql statement as parameter,
inside the function , open the cursor, process one record by record.
any samples?
thanks.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
-----------------------------------------
This message is intended only for the individual or entity to which
it is addressed and contains information that is proprietary to The
Babcock & Wilcox Company and/or its affiliates, or may be otherwise
confidential. If the reader of this message is not the intended
recipient, or the employee agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in
error, please notify the sender immediately by return e-mail and
delete this message from your computer. Thank you.
Oracle LazyDBA home page