Home » SQL & PL/SQL » SQL & PL/SQL » Update or create function paramater (Oracle Database 10g Enterprise Edition ,10.2.0.4.0, linux64_86)
Update or create function paramater [message #654793] Sat, 13 August 2016 08:40 Go to next message
abdo2203
Messages: 22
Registered: August 2016
Junior Member
Hi
I am new i this forum , Would you please help me to solve the bellow issue .

I want to update a paramater of function in oracle application i use this querry

SELECT get_parsysteme('FICHIER_LOGO') F_LOGO from dual ;

--------------------------------
logo.tif


how to update logo.tif to xxxx.tif or create a new parameter with new file name

Thank you

regards





Re: Update or create function paramater [message #654794 is a reply to message #654793] Sat, 13 August 2016 09:15 Go to previous messageGo to next message
John Watson
Messages: 7702
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

I am not certain that I understand your question, but I think you are asking how to change the value returned by your function for a given argument. You'll have to show the code for the GET_PARSYSTEME function, no-one can assist without that. Please be sure to format the code, and enclose it in [code] tags.
Re: Update or create function paramater [message #654795 is a reply to message #654794] Sat, 13 August 2016 09:21 Go to previous messageGo to next message
abdo2203
Messages: 22
Registered: August 2016
Junior Member
Thank you John for the quick respond :

the function syntax is :

create or replace
FUNCTION get_parsysteme (para_code VARCHAR2)
RETURN VARCHAR2 IS
v_para h_parsysteme.psy_valeur%type;

BEGIN
SELECT psy_valeur
INTO v_para
FROM h_parsysteme
WHERE psy_code = para_code;
RETURN (v_para);
EXCEPTION
WHEN OTHERS THEN
RETURN ('NO_DATA');
END;



----
Regards
Re: Update or create function paramater [message #654796 is a reply to message #654795] Sat, 13 August 2016 09:23 Go to previous messageGo to next message
John Watson
Messages: 7702
Registered: January 2010
Location: Global Village
Senior Member
Please use [code] tags when you post code.

You'll need to update the appropriate row in h_parsysteme.
Re: Update or create function paramater [message #654797 is a reply to message #654795] Sat, 13 August 2016 09:34 Go to previous messageGo to next message
EdStevens
Messages: 1021
Registered: September 2013
Senior Member
your function is simply reporting a bit of your application's data. It is just a "messenger". If you want to change the message, you need to look at your application. Like John Watson said, change the value in the row . . . . or change the value passed to the function, so that it selects a different row ...

[Updated on: Sat, 13 August 2016 09:35]

Report message to a moderator

Re: Update or create function paramater [message #654798 is a reply to message #654797] Sat, 13 August 2016 09:36 Go to previous message
abdo2203
Messages: 22
Registered: August 2016
Junior Member
Thank you very much John it's Completely clear to do the necessary update

Have nice day

regards
Previous Topic: Help reverse engineering pl sql query
Next Topic: PLS-00231:
Goto Forum:
  


Current Time: Sun Dec 16 05:14:41 CST 2018