I am executing a function that returns a dynamically built query, however the results get wrapped with a breaking space. Is there some way that I can stop this?
For instance if my result is supposed to come back as:
SELECT dummy from dual;
It returns:
SELECT dum
my from dual;
With a...
Basically what I want to do is something like this, although this does not work, maybe, it will help you understand what I am looking for:
CREATE OR REPLACE function fnMyFunc1(var_in IN varchar2) return varchar2
as
x varchar(32767);
xml varchar(32767);
BEGIN
EXECUTE IMMEDIATE ('SELECT...
Carp, here is what would be in fnMyFunc2:
CREATE OR REPLACE function fnMyFunc2(var_in IN varchar2) return varchar
as
x varchar2(32767);
begin
SELECT fnColumnList(var_in).transform(xmltype('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">...
If I changed x to sql_out, and fnMyFunc2 to fnMyDynSqlFunc would that help?
CREATE OR REPLACE function fnMyFunc1(var_in IN varchar2) return varchar2
as
sql_out varchar(32767);
BEGIN
SELECT fnMyDynSqlFunc(var_in) into sql_out from dual;
return sql_out;
end;
fnExecX take sql_in.
Ok, fnMyFunc1 is something I call that passes a variable into a function that returns a sql statement, eg: SELECT '1' as x from dual;
I want to then take that statement and execute it and return the results.
fnExecX returns the results, ignore fnExecV, it just takes the sql statement passed...
Hi, I am fairly new to oracle.
I have written a function that returns a sql statement that I would like to execute and return the results.
I have another function that I can execute the statement with, I so far have no idea of how to put this together.
This is the one that returns a sql...
ok, half the way there now.
CREATE OR REPLACE FUNCTION fnExecVc(sql_in IN varchar2) return Varchar2
As
x varchar(32767);
Begin
select translate(sql_in,chr(96),chr(34)) as trans into x from dual;
return x;
end;
This works, but on to a new problem.
I can only call one function from the...
ok, I can execute this and I get back these results:
SELECT XMLELEMENT(`table`,XMLAGG(XMLELEMENT(`row`,XMLELEMENT(`[column1]`,[column1]),XMLELEMENT(`[column2]`,[column2])))) FROM [vwMyView]',chr(96),chr(34)) as x from dual;
which is good, but I have trouble when passing to the next function to...
I am trying to build a sql statement from a function that will return xml, however oracle replaces my quote with "
Here is a sample of the function:
CREATE OR REPLACE function fnDynSelect(client_id_in IN number,feed_id_in IN number, view_in_name IN varchar2) return varchar2
as
x...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.