Execute a function in SQL Worksheet

How can I execute a function in SQL Worksheet.
The function takes in two parameters of type varchar2 and returns a boolean.
the syntax is:
set serveroutput on
VARIABLE x BOOLEAN;
EXECUTE :x := check_number('78','A');
PRINT x ;
my error is:
SP2-0552: Bind variable "X" not declared.
I have also tried:
set serveroutput on
select check_number('78','A')
from dual;
my error is:
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
thanks.

You could even cut out the variable:
SQL> CREATE OR REPLACE FUNCTION is_true
  2     ( p1 VARCHAR2
  3     , p2 VARCHAR2 )
  4     RETURN BOOLEAN
  5  AS
  6  BEGIN
  7     RETURN p1 = p2;
  8  END is_true;
  9  /
Function created.
SQL> exec dbms_output.put_line(sys.diutil.bool_to_int(IS_TRUE('x','y')))
0
PL/SQL procedure successfully completed.
SQL> exec dbms_output.put_line(sys.diutil.bool_to_int(IS_TRUE('x','x')))
1
PL/SQL procedure successfully completed.

Similar Messages

  • How to execute procedure in SQL Worksheet ?

    Hi, anybody know, how I can execute procedure here?
    I try EXEC sec_roles, EXEC security_admin.sec_roles, EXECUTE - there is a SQL statement error. When I use CALL - there is no such procedure (I have execute previleges).
    Although in SQLPlus EXEC works, but there are problems with standard SQL commands (all of them returns "2" no matter what content is).
    Any ideas?
    Regards
    Krzysztof

    exec procedure(parameters) is a sql plus (and a few others) shortcut for
    BEGIN
       procedure(parameters);
    END;So try that then pressing/clicking whatever it is in sql worksheet that makes a statement run.
    Note that if your procedure has parameters defined as OUT or IN OUT, you will need to supply a variable to accept the returned value(s).
    John

  • ADO function error:SQL execute.vi is not executable​.

    Thanks for everyone who is willing to help me out of this problem that puzzled me several days,I can't find a similar one from Google or other forum..
    Problem:
    When I was using LabSQL,it come an error:
    Subvi "SQL execute":subvi isnot executable. and then I searched the source of the error,it was finally found to be the 
    "ADO Recordset GetString.vi":
    "invoke node:invalid method"
    "invoke node:invalid refnum class". 
    What I used is Windows 7 and LabVIEW7.1.
    Attached is the detail of this problem that includes the vi and some error pictures,and the ADO functions I used.
    ute.vi" is
    Attachments:
    Error.zip ‏1865 KB

    Duplicate - http://forums.ni.com/t5/LabVIEW/ADO-function-error​-SQL-execute-vi-is-not-executable/m-p/2397360#M742​...
    Try to take over the world!

  • Error while executing the function

    hi,
    I have a table with the following data.
    T_1          T_2 T_3        T_4
    a.1            1 aa         ff
    a.1            2 ab         ff
    a.2            1 ba         ff
    a.2            2 bb         ff
    a.2            3 bc         ff
    a.2            4 bd         ff
    a.3            1 ca         ff
    a.3            3 cc         ff
    a.4            2 db         ffi want the data in the following way.
    col_1       col_2         col3
    a.1         1,2             aa ,ab
    a.2         1,2 ,3,4       ba,bb,bc,bd
    a.3         1,3             ca,cc
    a.4         2                db         For this , i have written a package as shown below.
    create or replace package t_emp_pkg as
    type typ_emp is record
    tv_t_1 t_Emp.t_1%type,
    tv_t_2 varchar2(20),
    tv_t_3 varchar2(20));
    type typ_emp_tab is table of typ_emp;
    function t_emp_func(pv_value in varchar2) return typ_emp_tab;
    end t_emp_pkg;
    create or replace package body t_emp_pkg as
    function t_emp_func(pv_value in varchar2) return typ_emp_Tab is
    cursor c1(v_value varchar2) is
    select distinct t_1 from t_emp where t_4 = v_value ;
    cursor c2(pv_t_1 varchar2) is
    select t_2,t_3 from t_emp
    where t_1 = pv_t_1;
    typ_emp_table typ_emp_tab := typ_emp_tab();
    t_count number := 0;
    c1_cur_rec c1%rowtype;
    c2_cur_rec c2%rowtype;
    v_temp_value1 varchar2(30);
    v_temp_value2 varchar2(30);
    begin
    open c1(pv_value);
    loop
    fetch c1 into c1_cur_rec;
    exit when c1%notfound;
    v_temp_value1 := null;
    v_temp_value2 := null;
    open c2(c1_cur_rec.t_1);
    loop
    fetch c2 into c2_cur_rec;
    exit when c2%notfound;
    v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    end loop;
    --close c2;
    t_count := t_count+1;
    typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_1);
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_2);
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_3);
    end loop;
    close c1;
    return typ_emp_table;
    end;
    end;
    When i executed the function , i got the following error.
    SQL> declare
    2 v t_emp_pkg.typ_emp_tab := t_emp_pkg.typ_emp_tab();
    3 begin
    4 v := t_emp_pkg.t_emp_func('ff');
    5 for i in v.first..v.last loop
    6 dbms_output.put_line(v(i).tv_t_1 ||', '||v(i).tv_t_2||', '||v(i).tv_t_3);
    7 end loop;
    8 end;
    9 /
    declare
    ERROR at line 1:
    ORA-06533: Subscript beyond count
    ORA-06512: at "SCOTT.T_EMP_PKG", line 30
    ORA-06512: at line 4
    but when i am running this queries in anonymous block (i.e) using declare,begin,end , i am getting the data correctly.
      1  declare
      2  pv_value varchar2(5) := 'ff';
      3   cursor c1(v_value varchar2) is
      4  select distinct t_1 from t_emp where t_4 = v_value ;
      5  cursor c2(pv_t_1 varchar2) is
      6  select t_2,t_3 from t_emp
      7  where t_1 = pv_t_1;
      8  --typ_emp_table typ_emp_tab := typ_emp_tab();
      9  t_count number := 0;
    10  c1_cur_rec c1%rowtype;
    11  c2_cur_rec c2%rowtype;
    12  v_temp_value1 varchar2(300);
    13  v_temp_value2 varchar2(300);
    14  begin
    15  open c1(pv_value);
    16  loop
    17  fetch c1 into c1_cur_rec;
    18  exit when c1%notfound;
    19  v_temp_value1 := null;
    20  v_temp_value2 := null;
    21  open c2(c1_cur_rec.t_1);
    22  loop
    23  fetch c2 into c2_cur_rec;
    24  exit when c2%notfound;
    25  v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    26  v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    27  end loop;
    28  close c2;
    29  t_count := t_count+1;
    30  --typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    31  --typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    32  --typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    33  dbms_output.put_line(c1_cur_rec.t_1);
    34  dbms_output.put_line(v_temp_value1);
    35  dbms_output.put_line(v_temp_value2);
    36  end loop;
    37  close c1;
    38* end;
    39  /
    a.2
    ,1,2,3,4
    ,ba,bb,bc,bd
    a.3
    ,1,3
    ,ca,cc
    a.4
    ,2
    ,db
    a.1
    ,1,2
    ,aa,ab
    PL/SQL procedure successfully completed.So can anybody tell me why it is not executing correctly when executing as a function.
    Thanks in advance.

    hi devmiral,
    I am not sure exactly where i am making the mistake. I have modified the package but still i am getting the error.
    create or replace package body t_emp_pkg as
    function t_emp_func(pv_value in varchar2) return typ_emp_Tab is
    cursor c1(v_value varchar2) is
    select distinct t_1 from t_emp where t_4 = v_value ;
    cursor c2(pv_t_1 varchar2) is
    select t_2,t_3 from t_emp
    where t_1 = pv_t_1;
    typ_emp_table typ_emp_tab ;
    --:= typ_emp_tab();
    t_count number := 0;
    c1_cur_rec c1%rowtype;
    c2_cur_rec c2%rowtype;
    v_temp_value1 varchar2(30);
    v_temp_value2 varchar2(30);
    begin
    open c1(pv_value);
    loop
    fetch c1 into c1_cur_rec;
    exit when c1%notfound;
    v_temp_value1 := null;
    v_temp_value2 := null;
    open c2(c1_cur_rec.t_1);
    loop
    fetch c2 into c2_cur_rec;
    exit when c2%notfound;
    v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    end loop;
    --close c2;
    t_count := t_count+1;
    typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    typ_emp_table := typ_emp_tab(c1_cur_rec.t_1,v_temp_value1,v_temp_value2);
    typ_emp_table.extend;
    end loop;
    close c1;
    return typ_emp_table;
    end;
    end;
    SQL> @t_emp_pkg_body.sql
    Warning: Package Body created with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY T_EMP_PKG:
    LINE/COL ERROR
    36/1     PL/SQL: Statement ignored
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'Thanks in advance.

  • How to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

  • Using User Defined Function is SQL

    Hi
    I did the following test to see how expensive it is to use user defined functions in SQL queries, and found that it is really expensive.
    Calling SQRT in SQL costs less than calling a dummy function that just returns
    the parameter value; this has to do with context switchings, but how can we have
    a decent performance compared to Oracle provided functions?
    Any comments are welcome, specially regarding the performance of UDF in sql
    and for solutions.
    create or replace function f(i in number) return number is
    begin
      return i;
    end;
    declare
      l_start   number;
      l_elapsed number;
      n number;
    begin
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(rownum)
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('first: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(sqrt(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('second: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(f(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('third: '||l_elapsed);
    end;
    Results:
       first: 303
       second: 1051
       third: 1515
    Kind regards
    Taoufik

    I find that inline SQL is bad for performance but
    good to simplify SQL. I keep thinking that it should
    be possible somehow to use a function to improve
    performance but have never seen that happen.inline SQL is only bad for performance if the database design (table structure, indexes etc.) is poor or the way the SQL is written is poor.
    Context switching between SQL and PL/SQL for a User defined function is definitely a way to slow down performance.
    Obviously built-in Oracle functions are going to be quicker than User-defined functions because they are written into the SQL and PL/SQL engines and are optimized for the internals of those engines.
    There are a few things you can do to improve function
    performance, shaving microseconds off execution time.
    Consider using the NOCOPY hints for your parameters
    to use pointers instead of copying values. NOCOPY
    is a hint rather than a directive so it may or may
    not work. Optimize any SQL in the called function.
    Don't do anything in loops that does not have to be
    done inside a loop.Well, yes, but it's even better to keep all processing in SQL where possible and only resort to PL/SQL when absolutely necessary.
    The on-line documentation has suggested that using a
    DETERMINISTIC function can improve performance but I
    have not been able to demonstrate this and there are
    notes in Metalink suggesting that this does not
    happen. My experience is that DETERMINISTIC
    functions always get executed. There's supposed to
    be a feature in 11g that acually caches function
    return values.Deterministic functions will work well if used in conjunction with a function based index. That can improve access times when querying data on the function results.
    You can use DBMS_PROFILER to get run-time statistics
    for each line of your function as it is executed to
    help tune it.Or code it as SQL. ;)

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

  • 4.1EA2 Text cursor goes missing in SQL Worksheet

    In EA1 and EA2, my cursor seems to intermittently go missing in SQL Worksheet
    Version info:
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.2 LTS
    Release: 14.04
    Codename: trusty
    (Running unity)
    $ java -version
    java version "1.8.0_25"
    Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
    (edit: Just tested in Windows - cursor does not go missing)
    One such pattern that I noticed it seems to go missing on is when running a script.
    Another pattern, if I hit enter a few times before the cursor has a chance to blink in between (not always), or hit the up or down arrow to go to the top or bottom of the page respectively, it also disappears.
    I'm able to get the mouse back by dragging the window out of maximize position.
    Couldn't reproduce in a procedure editor - assume will be same for package/function editor. So it's most prominent in SQL Worksheet.
    Message was edited by: trent I've had SQL Dev closed half a dozen times since reporting this, and now it seems OK. But it does seem to come and go =/

    I'm having this same issue that started happening with EA1 and persisted into EA2. It was not occurring prior to my upgrade. My input cursor disappears when scrolling up or down in code using the mouse wheel or scroll bar when the code extends beyond the display area. Moving the window does not help, but resizing the window appears to cause it to redraw and the cursor appears again. I can see what line I am on due to current line highlighting, and I can also select text or start typing to get an idea of where I am.
    OS:
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.2 LTS
    Release: 14.04
    Codename: trusty
    Linux 3.13.0-46-generic x86_64
    Java:
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    100% reproducible.
    Note that I was running 4.0.1.14.48 prior on Java 8 so it's likely a recent change and most likely not related to going from Java 7 to 8.
    (Previous version determined by ls -d ~/.sqldeveloper/system* which returned the following:
    Jul  7  2014 system4.0.1.14.48/
    Mar 13 16:00 system4.1.0.17.29/
    Mar 19 13:29 system4.1.0.18.37/

  • What happended to "Save As" in the SQL Worksheet?

    I am using 14.22 in Windows XP. In the previous version 13.43 I used to:
    1) Open a new SQL Worksheet.
    2) Type in statements.
    3) Press Ctrl-S to save the contents of the SQL Worksheet panel to a new file, an "Open File" dialog appeared.
    4) Enter file name for new SQL script file.
    Now when I press Ctrl-S I do not get the "Open File" dialog. The Ctrl-S saves the SQL Worksheet contents to a temp file in my user/.sqldeveloper/tmp directory. I have to copy the contents of the SQL Worksheet panel into a text editor and save it to a SQL file. Or I copy the SQL file in my temporary directory to the new file I want.
    I saw in another thread that the SQL Worksheet contents is not being saved to a temporary file to help prevent loss of contents if there were a machine outage. This change may have caused this problem.
    I use the "Save As" functionality in the SQL Worksheet a lot. That was how I create SQL files.
    How do I create a SQL script in SQL Developer now?
    Mike

    It got dropped by accident but it will be back in for EA7 that we expect to release any day now (just writing the release notes for it now). We have the Save As back in the menu and a right-click Save File from the Worksheet to save your work.
    -- Sharon

  • Can't edit in SQL Worksheet

    Currently using version 1.1.2.25 Build MAIN-25.79
    Yesterday I installed updates and extension for using Subversion.
    This morning having started SQL Developer up I am unable to use arrow keys, backspace, return key, delete key, home, end keys in SQL Worksheet. All these keys are available in Microsoft Word so its not the keypad.
    Can anyone provide an answer as a matter of urgency.
    Thanks.

    I would be amazed it if worked. So many differences between SQL Dev and JDev.. not to mention that SQL Dev is built on an unreleased JDev platform. Uninstall that extension and everything will probably go back to normal. You can setup external tools to mimic (albeit crudely) some of the functionality of the extension.

  • Invalid Column error in Access SPT & SQL Worksheet!

    SQLWKS> select x.rr,
    2> x.name,
    3> x......,
    4> x.mail_addr1,
    5> x.mail_addr2,
    6> x.mail_addr3,
    7> x.mail_addr4,
    8> x.mail_postcode,
    9> x....,
    10> x........,
    11> x........,
    12> x........,
    13> x........,
    14> a_b_c(x.mail_postcode) z 'this is the line that calls
    function 'a_b_c' (using x.mail_postcode as the variable) which
    throws the error below in access and sql worksheet.
    15> from x
    16> where (.........
    17> or ..... is null)
    18> and not exists
    19> (select 'x' from .......where .......=
    20> x.rr)
    21>
    a_b_c(x.mail_postcode) z
    ORA-00904: invalid column name
    If anybody has any idea how to get around this please email me
    or post you comments.
    Thanks
    Leslie
    null

    SQLWKS> select x.rr,
    2> x.name,
    3> x......,
    4> x.mail_addr1,
    5> x.mail_addr2,
    6> x.mail_addr3,
    7> x.mail_addr4,
    8> x.mail_postcode,
    9> x....,
    10> x........,
    11> x........,
    12> x........,
    13> x........,
    14> a_b_c(x.mail_postcode) z 'this is the line that calls
    function 'a_b_c' (using x.mail_postcode as the variable) which
    throws the error below in access and sql worksheet.
    15> from x
    16> where (.........
    17> or ..... is null)
    18> and not exists
    19> (select 'x' from .......where .......=
    20> x.rr)
    21>
    a_b_c(x.mail_postcode) z
    ORA-00904: invalid column name
    If anybody has any idea how to get around this please email me
    or post you comments.
    Thanks
    Leslie
    null

  • How to execute a function and return the result into a bind variable

    Hi,
    I am trying to calculate the sum of salaries of all persons with a particular JOB_ID using a function TOTAL_INCOME(v_job_id).
    create or replace function total_income
    +(v_job_id IN varchar2)+
    RETURN number IS
    v_total number(6);
    cursor get_sal is
    select salary from employees
    where job_id = v_job_id;
    BEGIN
    v_total := 0;
    for emp in get_sal
    loop
    v_total := v_total emp.salary;+
    end loop;
    dbms_output.put_line('Total salary of '||v_job_id||' is: '|| v_total);
    return v_total;
    END;
    Now I woud like to execute this function and assign the returned value into a bind variable test_sal
    variable test_sal number(6)
    SELECT total_income('AD_VP') into :test_sal FROM DUAL;
    dbms_output.put_line('Total Sal:'||:test_sal);
    This is returning the below errors:
    SELECT total_income('AD_VP') into :test_sal FROM DUAL
    *+
    Error at line 0
    ORA-01036: illegal variable name/number
    dbms_output.put_line('Total Sal:'||:test_sal);
    Error at line 3
    ORA-00900: invalid SQL statement
    Could someone help me what could be the problem?? Thanks for your time...

    Dear,
    If everything you will do will be done inside PL/SQL (stored procedure or stored function) then you don't have to care about bind variable.
    When using PL/SQL (static SQL) you will never encounter issues related to bind variables. PL/SQL itself takes care of your code and uses bind variables behind the scene.
    The only situation where you have to look carefully to the use of bind variables within PL/SQL is when you use Dynamic sql into stored procedures or functions.
    So, see in the light of the above comment, if you have to care about returning your function into a bind variable?
    Best regards
    Mohamed Houri

  • Bug in SQL Developer 1.5 SQL Worksheet

    Hello,
    did any of you already encounter the following effect in version 1.5's SQL Worksheet?
    When I try to execute the following statement in version 1.5:
    select (1 +
    2 -
    3 +
    4)
    from dual;
    I get the error: ORA-00907 missing right parenthesis
    With more complex statements I also get an 'unimplemented feature' error.
    When I put the operators in front like this:
    select (1
    + 2
    - 3
    + 4)
    from dual;
    i get the correct answer '4' as result. Seems to be clearly a bug for me. In version 1.2 both versions work perfectly well.
    Does anyone know whether there's already some bug filed for this or whether there's a patch around?
    Regards Holger

    Hi Dieter W.
    It looks like the command does work in sqlplus , from what I can see only the first line (and continued first line) has continuation character facility. (I am working on an other related SQLDeveloper bug).
    i.e. No continuation character (10.2XE)
    SQL> select (1 +
    2 -
    3 +
    4)
    from dual;
    2 3 4 5
    (1+2-3+4)
         4
    Continuation character:
    SQL> select (1 -
    1 -
    1 -
    3)
    from dual
    2 3 select (1 1     1 3)*
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    I am on the lookout for more information...
    -Turloch

  • SQL-Developer 1.5.4 - SQL-Worksheet does not use Table-Owner

    In old versions of the sql-Developer you can drop a Table in the Worksheet and a select Query was built. With the new version 1.5.4 the table-owner is missng and you must fill in the table-owner or the query does not work with tables of other users.
    Is that a bug or are there the posibility of change settings to drop tables in the SQL-worksheet with table-owners.

    The drag and drop functionality was updated so that when you use drag and drop the schema is not prefixed for the current user you are connected to. However it is appended if you drag a table form another connection. It appears to have been overlooked for Other Users. We will address this in a future release. In the meantime,a workaround is to create a connection to the other users and then the drag and drop will append the connection name.
    Sue

  • Light Grey-Blue highlighting significance in SQL Worksheet - turn it off?

    Hi
    I've been working with SQLDeveloper for a while, and I'm now intrigued what the significance of the light context sensitive highlighting in the SQL worksheet window might be.
    If I have one SQL statement in the window and I execute it with a ctrl-enter then the statement gets a blue-grey highlight.
    If there are two statements and you ececute the second then the second one gets the goulish highlight.
    I'm sure that this makes good sense to someone.
    Is there any way to turn this quirkish thing off?
    Thanks
    Mike

    Hi Tim
    Thanks for the reply.
    Apart from turning it off - I can't figure out why you would want it in the first place??
    Usually someone spends time coding something they think will add value.
    For me it's just clutter especially when I'm editing a long(ish) script of 100+lines - I just prefer a clean interface.
    I have enough difficulty working out what I should be coding - let alone having my script switching colours on and off ;(
    Anyone else?
    Thanks
    Mike

Maybe you are looking for

  • Can't open Raw files in Photoshop CS6 using Nikon D7100?

    I have a Nikon D7100 and recently did a photoshoot where I shot in Raw. Upon uploading my images and then attempting to open them in Photoshop it came up with a pop up saying that photoshop is unable to open that camera raw file. I have downloaded th

  • Why is my iMac running extremely slowly??

    My mid-2010 iMac has been running excrutiatingly slowly over the past few months, with the spinning beachball popping up any time I click on anything at all. I started in SafeMode and the problem disappears, leading me to believe it might be a softwa

  • CIF "Payment Terms" to SNC?

    Hi, I want to maintain our payment terms from our back-end SAP system to SNC. The payment terms is already on the PO today, but not in SNC. We are in the implementation phase of SNC, with only a handfull of suppliers onboarded. I know that you can ma

  • Solaris 10 11/06 can't boot if I remove DVDROM

    dear all... I try to install Solaris 10 x86 11/06 on HP Proliant DL140 with SATA HDD but no DVDROM... I borrow my PC DVDROM and install to my HDD...eveything run fine but when I remove my DVDROM, solaris can't boot the OS... may be because configurat

  • Oop's  subtotals

    Hi guru's. plz any one can tell me how to do the sub totals in alv's with  oop's Thanks & Regards,   satish.