Home » SQL & PL/SQL » SQL & PL/SQL » plsql procedures sending field as parameter
plsql procedures sending field as parameter [message #353287] Mon, 13 October 2008 04:43 Go to next message
gil_adino
Messages: 1
Registered: October 2008
Junior Member
Hi

When Calling to procedure,i want to update some field but which field is one off the procedure parameters
e.g.

procedure UpdatePlayer(PlayerID_in IN number,
                       Field_in    IN varchar2,
                       Val_in      IN Number ) is
...

'update players p set p.Field_in = Val_in where p.id= PlayerID'
...

end UpdatePlayer


Can anyone show me how to do it??

Tnx gil
Re: plsql procedures sending field as parameter [message #353292 is a reply to message #353287] Mon, 13 October 2008 04:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use dynamic SQL.
Search for "execute immediate" in the doc.
I recommend you to Google for "SQL injection".

Regards
Michel
Re: plsql procedures sending field as parameter [message #353332 is a reply to message #353287] Mon, 13 October 2008 05:55 Go to previous message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
U can see the examples,

http://sadatdba.blogspot.com/2008/09/execute-immediate-option-for-dynamic.html
Previous Topic: arabic text in where condition
Next Topic: script to grant insert, update for all tables in a schema
Goto Forum:
  


Current Time: Thu Feb 13 11:03:38 CST 2025