Created
February 14, 2016 22:25
Get url parameter in Oracle using owa_util
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get parameter from the URL HTTP query string | |
* | |
* @param p_attribute Specifies the name of the variable in the HTTP query string to retrieve | |
* @return value | |
*/ | |
function at_get_env_parameter (p_attribute in varchar2) return varchar2 as | |
p_regex varchar2(254) := '=([^&]*)'; | |
p_result varchar2(254); | |
l_query_strings varchar2(254):= owa_util.get_cgi_env('QUERY_STRING'); | |
begin | |
if p_attribute is not null then | |
p_result := regexp_substr(l_query_strings, p_attribute || p_regex); | |
p_result := substr(p_result, instr(p_result, '=') + 1); | |
end if; | |
return p_result; | |
end at_get_env_parameter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment