🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

how to call function in execute sql

User: "sgnarkhede2016"
New Altair Community Member
Updated by Jocelyn
how to call function in execute sql

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "kayman"
    New Altair Community Member
    Just as you would call it in a 'standard' sql environment. What is your exact problem? 
    User: "sgnarkhede2016"
    New Altair Community Member
    OP
    No values return when passing Execute Sql

    CREATE OR REPLACE FUNCTION return_hello(p_name VARCHAR2)
    RETURN VARCHAR2 AS
    m_return VARCHAR2(1000) := NULL;
    BEGIN
    m_return := 'HELLO ' || p_name || ' !!';
    RETURN m_return;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURN NULL;
    END;
    User: "kayman"
    New Altair Community Member
    You only execute the command with the execute SQL operator, there is no return option in this case.

    So it will create your function but in order to use it you'll have to use the Read database operator and then call your created function.  This operator has the output option to show the results so you need to combine the execute and read operators.