bind the variable column of v$ sqlarea

BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE     10.2.0.4.0     Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
select to_char(sql_fulltext), bind_data from v$sqlarea where sql_id = '5fwm73ndv5pjp';
TO_CHAR(SQL_FULLTEXT)                    BIND_DATA
select vgal.GAFS_DISPLAY_LINE_CD
from view_gafs_account_line vgal
 where vgal.ACCOUNT_ID =  :p1 and
 vgal.ACCOUNT_LINE_SEQ_CD =  :p2 and 
vgal.ACCOUNT_TYPE_ID =  :p3 and 
vgal.PROGRAM_SUMMARY_ID =  :p4     
I'm not horribly v$ sqlarea. but there were some questions about the application executes a query and get
no row is returned.

I find the query in v$ sqlarea but I would like to know what are bind variables, but this column is null.

This means that the query has been run with null for all bind variables?
or bind variables not seized for any reason are any?

v$ sql_bind_capture I bind the value of the variable

SELECT
   a.sql_text,
   b.name,
   b.position,
   b.datatype_string,
   b.value_string
FROM

  v$sql_bind_capture b,

  v$sqlarea          a

WHERE

   b.sql_id = 'dpf3w96us2797'

AND
   b.sql_id = a.sql_id;

Tags: Database

Similar Questions

  • Is it possible the reel with the variable column size?

    Hi, I'm queue to a CSV file with the following script (the SELECT real is different but similar, Oracle 10.2.0.3.0):
    SET COLSEP ';'
    SET FEEDBACK OFF
    SET LINESIZE 2000
    SET PAGESIZE 0
    SET TERMOUT OFF
    SET TRIMSPOOL ON
    SET VERIFY OFF
    
    SPOOL test.csv REPLACE
    
    SELECT 'COLUMN1', 'COLUMN2', 'COLUMN3' FROM dual UNION ALL
    SELECT 'value1', NULL, NULL FROM dual UNION ALL
    SELECT 'value2', NULL, NULL FROM dual;
    
    SPOOL OFF
    
    EXIT SUCCESS COMMIT
    Which produces the following output:
    COLUMN1;COLUMN2;COLUMN3
    value1 ;       ;
    value2 ;       ;
    Is it possible to get the following with the variable column size result
    COLUMN1;COLUMN2;COLUMN3
    value1;;
    value2;;
    I tried SET NULL "but I see no difference. Thanks in advance!

    Markus

    Hello

    SQL * Plus you button the output so that each column has a fixed length, which is exactly what you don't want.

    To get around this, concatenate all your data in a column VARCHAR2 fat with delimiters.

    For example, instead of

    SELECT    empno
    ,       ename
    ,       hiredate
    FROM       scott.emp
    ;
    

    Do something like

    SELECT    empno
    || ';' || ename
    || ';' || TO_CHAR (hiredate, 'DD-Mon-YYYY')
    FROM       scott.emp
    ;
    
  • to BIND the variable SUBSTITUTION

    I have a code where I find dates START and end range for the past 3 years, the beginning Date must start on a Sunday and the end Date is at the end on Saturday using the weird system they have here:-)

    the end usable VARIABLE must be in YYYYMMDD format as number, because that's how they set up Date here... can anything about...

    So I thought to all the Dates, performing a combination of Variables of SUBSTITUTION AND LINKING, why I do like that it is because

    I received an error when I used just the variables SUBSTITUTION (maximum 240 characters used on the START DATE of the year2, in)

    switching to this, the error has disappeared), well that's what I thought he'll fix it.

    But now, when I try to use and VARIABLE in SQL, I get an error that it cannot use BIND variables, so try to pass values to a SUBSTITUTION

    afin_que this error disappears) - unless there is a better way?

    If there is a better way to stay maybe everything inside SUBSTITUTION and don't imply any LINK, maybe it would be better, if you guys know a way around the 240 character error...

    :-)

    My variables are:

    -find YEAR 1

    SET LY_END_DATE_NUM = "TO_NUMBER (TO_CHAR (NEXT_DAY ((SYSDATE-7), 'SATURDAY'), 'YYYYMMDD'));

    variable BIND_LY_END_DATE_N number;

    run: BIND_LY_END_DATE_N: = & LY_END_DATE_NUM;

    PRINT BIND_LY_END_DATE_N;

    SET LY_START_DATE = ' TO_DATE (: BIND_LY_END_DATE_N, 'yyyy-mm-dd')-363;

    SET LY_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& LY_START_DATE, 'YYYYMMDD'));

    variable BIND_LY_START_DATE_N number;

    run: BIND_LY_START_DATE_N: = & LY_START_DATE_NUM;

    PRINT BIND_LY_START_DATE_N;

    -find YEAR 2

    SET YRS2_END_DATE = ' TO_DATE (: BIND_LY_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS2_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_END_DATE_N number;

    run: BIND_YRS2_END_DATE_N: = & YRS2_END_DATE_NUM;

    PRINT BIND_YRS2_END_DATE_N;

    SET YRS2_START_DATE = ' TO_DATE (: BIND_YRS2_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS2_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_START_DATE_N number;

    run: BIND_YRS2_START_DATE_N: = & YRS2_START_DATE_NUM;

    PRINT BIND_YRS2_START_DATE_N;

    -find YEAR 3

    SET YRS3_END_DATE = ' TO_DATE (: BIND_YRS2_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS3_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_END_DATE_N number;

    run: BIND_YRS3_END_DATE_N: = & YRS3_END_DATE_NUM;

    PRINT BIND_YRS3_END_DATE_N;

    SET YRS3_START_DATE = ' TO_DATE (: BIND_YRS3_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS3_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_START_DATE_N number;

    run: BIND_YRS3_START_DATE_N: = & YRS3_START_DATE_NUM;

    PRINT BIND_YRS3_START_DATE_N;

    Hello

    Kodiak_Seattle wrote:

    I have a code where I find dates START and end range for the past 3 years, the beginning Date must start on a Sunday and the end Date is at the end on Saturday using the weird system they have here:-)

    the end usable VARIABLE must be in YYYYMMDD format as number, because that's how they set up Date here... can anything about...

    So I thought to all the Dates, performing a combination of Variables of SUBSTITUTION AND LINKING, why I do like that it is because

    I received an error when I used just the variables SUBSTITUTION (maximum 240 characters used on the START DATE of the year2, in)

    switching to this, the error has disappeared), well that's what I thought he'll fix it.

    But now, when I try to use & VARIABLE in SQL, I get an error that it cannot use BIND variables, so try to pass values to a SUBSTITUTION

    afin_que this error disappears) - unless there is a better way?

    If there is a better way to stay maybe everything inside SUBSTITUTION and don't imply any LINK, maybe it would be better, if you guys know a way around the 240 character error...

    :-)

    My variables are:

    -find YEAR 1

    SET LY_END_DATE_NUM = "TO_NUMBER (TO_CHAR (NEXT_DAY ((SYSDATE-7), 'SATURDAY'), 'YYYYMMDD'));

    variable BIND_LY_END_DATE_N number;

    run: BIND_LY_END_DATE_N: = & LY_END_DATE_NUM;

    PRINT BIND_LY_END_DATE_N;

    SET LY_START_DATE = ' TO_DATE (: BIND_LY_END_DATE_N, 'yyyy-mm-dd')-363;

    SET LY_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& LY_START_DATE, 'YYYYMMDD'));

    variable BIND_LY_START_DATE_N number;

    run: BIND_LY_START_DATE_N: = & LY_START_DATE_NUM;

    PRINT BIND_LY_START_DATE_N;

    -find YEAR 2

    SET YRS2_END_DATE = ' TO_DATE (: BIND_LY_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS2_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_END_DATE_N number;

    run: BIND_YRS2_END_DATE_N: = & YRS2_END_DATE_NUM;

    PRINT BIND_YRS2_END_DATE_N;

    SET YRS2_START_DATE = ' TO_DATE (: BIND_YRS2_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS2_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_START_DATE_N number;

    run: BIND_YRS2_START_DATE_N: = & YRS2_START_DATE_NUM;

    PRINT BIND_YRS2_START_DATE_N;

    -find YEAR 3

    SET YRS3_END_DATE = ' TO_DATE (: BIND_YRS2_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS3_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_END_DATE_N number;

    run: BIND_YRS3_END_DATE_N: = & YRS3_END_DATE_NUM;

    PRINT BIND_YRS3_END_DATE_N;

    SET YRS3_START_DATE = ' TO_DATE (: BIND_YRS3_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS3_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_START_DATE_N number;

    run: BIND_YRS3_START_DATE_N: = & YRS3_START_DATE_NUM;

    PRINT BIND_YRS3_START_DATE_N;

    Let me make sure I understand the problem.

    One year, in this problem, is exactly 364 days.

    You want the year that ended on the most recent Saturday (otherwise said, the year ending Saturday between 6 days ago and today) and two years ago.

    You want the first date in each of those years and the last date each year, in the format YYYYMMDD.

    Is this fair?

    Here's a way to define variables of substitution (with names like year_1_start):

    COLUMN y1_start new_value by year_1_start

    COLUMN y1_end new_value by year_1_end

    COLUMN y2_start new_value by year_2_start

    COLUMN y2_end new_value by year_2_end

    COLUMN y3_start new_value by year_3_start

    COLUMN y3_end new_value by year_3_end

    WITH got_y1e AS

    (

    SELECT NEXT_DAY (SYSDATE - 7 'SATURDAY') AS y1e

    OF the double

    )

    SELECT TO_CHAR (y1e + 1 - (364 * 3), 'YYYYMMDD') AS y3_start

    , TO_CHAR (y1e - (364 * 2), 'YYYYMMDD') AS y3_end

    , TO_CHAR (y1e + 1 - (364 * 2), 'YYYYMMDD') AS y2_start

    , TO_CHAR (y1e - 364, 'YYYYMMDD') AS y2_end

    , TO_CHAR (y1e + 1-364, 'YYYYMMDD') AS y1_start

    , TO_CHAR (y1e, 'YYYYMMDD') AS y1_end

    OF got_y1e

    ;

    If you prefer that bind variable, write an anonymous PL/SQL block and use the same logic to 6 variables.

  • Bind the Variable in a dynamic query

    The procedure below uses a variable binding for the deptno and run it with a ref cursor The expected result is to display the ename from EMP for the deptno passed for the p_deptno parameter, but the procedure fails with an exception.

    CREATE OR REPLACE PROCEDURE dynamic_query(p_deptno NUMBER)
    AS
        lv_deptno number(4);
    --    l_lookup_type    VARCHAR2(30):='PBAMERICAS_CO';
        lv_query VARCHAR2(15000) :=' SELECT  ename,''Year'' from emp where deptno='|| p_deptno;
        lv_cursor  SYS_REFCURSOR;
        lv_lookup VARCHAR2(20);
        lv_emp_rec emp%rowtype;
        lv_ename VARCHAR2(10);
        lv_year   VARCHAR2(10);
    BEGIN
        dbms_output.put_line(lv_query);
        OPEN lv_cursor FOR lv_query USING p_deptno ;
        Loop
            FETCH lv_cursor INTO lv_ename,lv_year;
            dbms_output.put_line(lv_ename || ',' ||lv_year);
          EXIT WHEN lv_cursor%NOTFOUND;
         END LOOP;
        CLOSE lv_cursor;
    END dynamic_query;       
    
    
    

    
    
    SQL> exec dynamic_query(10);
    SELECT  ename,'Year' from emp where deptno=10
    BEGIN dynamic_query(10); END;
    
    
    *
    ERROR at line 1:
    ORA-01006: bind variable does not exist
    ORA-06512: at "APPS.DYNAMIC_QUERY", line 13
    ORA-06512: at line 1
    
    
    
    
    
    
    

    I can change the code slightly and change the where clause to work but wanted to know what am I did wrong which makes the procedure fails with the above code.

    CREATE OR REPLACE PROCEDURE APPS.dynamic_query(p_deptno NUMBER)
    AS
        lv_deptno number(4);
       lv_query VARCHAR2(15000) :=' SELECT  ename,''Year'' from emp ' ;
        lv_cursor  SYS_REFCURSOR;
        lv_lookup VARCHAR2(20);
        lv_emp_rec emp%rowtype;
        lv_ename VARCHAR2(10);
        lv_year   VARCHAR2(10);
    BEGIN
    
    
        IF p_deptno IS NOT NULL THEN
            lv_query := lv_query || ' Where deptno =' || TO_CHAR(p_deptno);
         END IF;
             dbms_output.put_line(lv_query);
        OPEN lv_cursor FOR lv_query  ;
        Loop
            FETCH lv_cursor INTO lv_ename,lv_year;
            dbms_output.put_line(lv_ename || ',' ||lv_year);
          EXIT WHEN lv_cursor%NOTFOUND;
         END LOOP;
        CLOSE lv_cursor;
    END dynamic_query;
    /
    
    

    PS: I use the table EMP for this example includes so not CREATE TABLE and INSERT.

    The procedure below uses a variable binding

    No, it isn't.

    You're just concatenation of the value of p_deptno in the query, such as a literal.

    It's using a variable binding:

    lv_query VARCHAR2 (15000): = ' 'year', SELECT ename from emp where deptno =: 1';

    Then, the variable may be correctly bound (by post) via the USING clause.

  • Bind the Variable Table name in the query of VO

    I have a VO that must have its clause defined dynamically at run time.  I have a string bind variable defined with a default value that is referenced in the query of the VO.  However, JDeveloper allow me to leave the definition of the query of the view object when the from clause is a variable binding, even if the binding variable has the default value.

    For example.

    Select

    « X »

    Of

    : TABLE

    where

    1 = 1

    The variable binding TABLE is defined as a string with a default value of the 'double '.  Did I miss something in the definition of the VO?

    Thank you

    Hello

    I suggest you to dynamically set the query of the view object.  This does not meet your requirements.

    xxVo.setQuery ();

  • BIND THE VARIABLE INSIDE A LOOP

    Hello
    I have question about the sort of the values using Plsql... My requirement is to get values of N with the user and sorting in ascending or descending order. I tried the following query

    DECLARE
    Is of type TABLE numsort
    NUMBER
    INDEX OF DIRECTORY;
    v_num numsort;
    number of v_total;
    number of v_no;
    BEGIN
    -get the number of values to sort
    v_total: =: TotalNum;
    dbms_output.put_line (v_total);
    because me in 1.v_total
    LOOP
    v_no: =: none; -Read the values
    v_num (i): = v_no;
    dbms_output.put_line (v_num (i): 10;)
    END LOOP;
    END;

    its code is not complete... sound to read the value in the table... Read itself does not

    The problem is that the connection variable is not reset with each iteration. I am using Toad and he asked me to pass all the variable binding both... But I want to read the values in the table with each iteration. Is it possible in PLSQL... or is there another way to do this...

    hope you are clear with the requirement... If any infomartion extra need please come bk...

    Waiting for your replay

    Thanks and greetings
    Rognard

    Maybe like this?

    SQL> create or replace procedure test_proc (p_input varchar2, p_separator varchar2) is
      2  v_input varchar2(32767):= p_input||p_separator;
      3  begin
      4  if p_input is not null then
      5  while instr(v_input,p_separator) > 0 loop
      6      dbms_output.put_line(substr(v_input,1,instr(v_input,p_separator)-1));
      7      v_input:=substr(v_input,instr(v_input,p_separator)+1);
      8  end loop;
      9  end if;
     10  end;
     11  /
    
    Procedure created.
    
    SQL> exec test_proc('10, 4, 6, 3',',')
    10
    4
    6
    3
    
    PL/SQL procedure successfully completed.
    
    SQL> exec test_proc('',',')
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    Nicolas.

  • Bind the Variable problem

    Hi all

    CREATE OR REPLACE PROCEDURE PRMADM_BATCH. UPDATE_PROC_LOG (p_SRC_SYS_ID VARCHAR,
    p_APPL_MOD_NM VARCHAR, p_INPT_OBJ_NM VARCHAR, VARCHAR, p_OUTPT_OBJ_NM p_ERR_ID
    VARCHAR, p_ERR_DESC VARCHAR)
    AS
    number of p_OUTPT_ROW_CNT;
    number of p_INPT_ROW_CNT;
    p_OUTPT_SQL VARCHAR2 (4000);
    p_INPT_SQL VARCHAR2 (4000);
    number of p_ERR_ID_CHK;
    BEGIN
    IF p_ERR_ID = 0 THEN - success
    p_OUTPT_ROW_CNT: = 0;
    p_INPT_ROW_CNT: = 0;
    p_OUTPT_SQL: = NULL;
    p_INPT_SQL: = NULL;
    p_ERR_ID_CHK: = 0;
    DBMS_OUTPUT. PUT_LINE ('SRC_SYS_ID =' | p_SRC_SYS_ID);
    p_OUTPT_SQL: = 'SELECT COUNT (*) FROM "| p_OUTPT_OBJ_NM | ' WHERE
    SRC_SYS_ID =: a ';
    p_INPT_SQL: = 'SELECT COUNT (*) FROM "| p_INPT_OBJ_NM | ' WHERE
    SRC_SYS_ID =: b';
    DBMS_OUTPUT. Put_line (p_OUTPT_SQL);
    DBMS_OUTPUT. Put_line (p_INPT_SQL);
    EXECUTE IMMEDIATE p_OUTPT_SQL IN p_OUTPT_ROW_CNT IN USING p_SRC_SYS_ID;
    EXECUTE IMMEDIATE p_INPT_SQL IN p_INPT_ROW_CNT IN USING p_SRC_SYS_ID;
    Else - failure
    p_OUTPT_ROW_CNT: = - 1;
    p_INPT_ROW_CNT: = - 1;
    p_OUTPT_SQL: = NULL;
    p_INPT_SQL: = NULL;
    p_ERR_ID_CHK: = - 1;
    SELECT COUNT (*) IN the p_ERR_ID_CHK OF PRMADM. ERR WHERE ERR_ID =
    p_ERR_ID;
    IF p_ERR_ID_CHK = 0 THEN
    INSERT INTO PRMADM. ERR (ERR_ID, ERR_DESC) VALUES (p_ERR_ID,
    p_ERR_DESC);
    COMMIT;
    END IF;
    END IF;
    UPDATE PRMADM. PROC_LOG
    SET PROC_END_DY_DT = SYSDATE,
    INPT_ROW_CNT = p_INPT_ROW_CNT,
    OUTPT_ROW_CNT = p_OUTPT_ROW_CNT,
    ERR_ID = p_ERR_ID
    WHERE APPL_MOD_NM = p_APPL_MOD_NM
    AND PROC_END_DY_DT IS NULL
    AND OUTPT_OBJ_NM = p_OUTPT_OBJ_NM
    AND INPT_OBJ_NM = p_INPT_OBJ_NM
    AND SRC_SYS_ID = p_SRC_SYS_ID;
    COMMIT;
    END UPDATE_PROC_LOG;
    /

    The proc above is running well and gives the result below

    SRC_SYS_ID = 1030
    SELECT COUNT (*) IN THE PRMADM. PGM WHERE
    SRC_SYS_ID =: a
    SELECT COUNT (*) IN THE PRMADM. INPT_PGM WHERE
    SRC_SYS_ID =: b


    My question is where can I enter the value for the variable bind a and b...

    I want to put two to 1030

    Thanks in advance

    Ndiaye (ndiaye) wrote:
    p_SRC_SYS_ID (input in my proc parameter) takes the value of 1030 and I want that the connection variable: an and: b take the same value...

    But they take this value...

    EXECUTE IMMEDIATE p_OUTPT_SQL IN p_OUTPT_ROW_CNT IN USING p_SRC_SYS_ID;
    EXECUTE IMMEDIATE p_INPT_SQL IN p_INPT_ROW_CNT IN USING p_SRC_SYS_ID;

    The 'USE' of the declaration part links the value to bind variables in the SQL statement.

    Where is the problem?

  • To bind the Variable as being of a literal string value

    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod

    PL/SQL Release 10.2.0.5.0 - Production

    CORE Production 10.2.0.5.0

    AMT for Linux: Version 10.2.0.5.0 - Production

    NLSRTL Version 10.2.0.5.0 - Production

    Hi there, thank in advance. I have a problem when you create a dynamic statement. The problem is in the binding variable': OLD. CUST_NAME'... my question is is there an escape character to treat the affair as a literal string variable?

    {code}

    v_str2: = "' client_name =" ' |' | ' || ': OLD. CUST_NAME';

    EXECUTE IMMEDIATE 'create or replace trigger trg_.

    || SUBSTR (rec_cur.table_name, 1, 26)

    || "before insert or update or delete on.

    || rec_cur. Owner

    || '.'

    || rec_cur.table_name

    || '

    declare

    Start

    If the UPDATE can

    FIFAPPS.ibug.log_errors('||)

    v_str2 | »

    );

    end if;

    end;';

    {code}

    I want the output in a trigger something like this:

    {code}

    If the UPDATE can

    FIFAPPS.ibug.log_errors (' client_name ='|: O LD.) CUST_NAME

    );

    {code}

    Hello

    What is the need of business that you are trying to address?  Before writing any kind or trigger and especially before you dynamically create a lot of triggers, see if Oracle provides a better way to meet your needs, for example, audit.

    If triggers are really justified, and you are looking for just an easy way to crank out a large number of almost identical triggers right now (not something that end users will do all the time), so I suggest SQL * Plus and the substitution variables.  It will be easier to debug writing and debugging, because you won't have to you not so much worried about quotes and concatenation.  For example, if all the triggers are identical except for the diagram, the table name and column name, you can write a simple script that can be used to create an unlimited number of triggers, like this:

    -Trigger_Factory.sql - create trigger standard

    DEFINE schema_name = & 1
    DEFINE table_name = & 2
    DEFINE column_name = & 3

    CREATE OR REPLACE TRIGGER trg_ & table_name
    BEFORE ON INSERT or UPDATE or DELETE &... schema_name table_name
    -' SEO NEW OLD NEW old' is the default, so do not say

    -REFERENCING NEW AS NEW OLD O
    -In this way, you don't have to worry about the bad OLD spelling.
    FOR EACH LINE
    BEGIN
    IF THE UPDATE CAN
    fifapps. IBUG.log_errors (: OLD & column_name);
    ...

    Once you have this course of debugging, you can write another script that calls the script above:

    @trigger_factory fifapps t t_column_key

    @trigger_factory fifapps u colonne_1

    @trigger_factory foo bar column_xyz

    Alternatively, instead of manually create a script like the one above, write a query to do it for you:

    SELECT '@trigger_factory'

    owner

    table_name

    column_name

    From all_tab_columns

    WHERE THE...

  • Access to bind the variables of class EntityImpl

    Hello

    I use jdeveloper 11.1.1.7.0

    I have an Obj to the entity and a view Obj, in the a view Obj I defined some variables bind to the WhereClause,

    EntityImpl of EO class, I need to access these variable bind, how can I do for this case?

    Habib

    Concerning

    There are several options:

    1. download VO in your EOImpl class (as I have already suggested). It is the best way to recover your var bind, but will present a dependence between OT and VO (and usually EO should not depend on a VO, but of course it depends on concrete use cases). So, if you know that there is only one THAT VO editable based on this OS, I'd go with this approach.

    2. put your var to link to the http session and then access this variable with: ADFContext.getCurrent () .getSessionScope ().  It is not difficult to implement, but this isn't a very good approach because it would break the MVC pattern (you should not reference something layer in the layer of view model).

    3. place your var bind to structure UserData. It's probably "appropriately", but it is also the most difficult to implement correctly, see for example Andrejus Baranovskis Blog: Solution for sharing the global user data in British Colombia ADF

    Dario

  • name of the variable column for a source

    Can I have a column name variable for a text box, such as this one source

    Select (: P2_column_name) of the budget where id =: P2_id;

    I get the: P2_column_name variable and not really the content of the column.
    what I am doing wrong, thank you, Doug

    Only works for reports. It sounded like you want to select in a correct form, update the value and then present at the table element?

    Thank you

    Tony Miller
    Webster, TX

    I cried because I don't have an office with a door until I met a man who had no cubicle.
    -Dilbert

    If you answer this question, please mark the thread as closed and give points where won...

  • bind the variable question

    Hello

    I wonder what trivial mistake, am I doing here? Qsure uite that the syntax is correct and it has worked before in the developer doesn't have it?

    variable bind_variable number
    execute :bind_variable := 1;
    print bind_variable
    
    
    PL/SQL procedure successfully completed.
    
    
    
    
    BIND_VARIABLE
    ------
    
    
    


    I found regarding reports bug, but for versions a lot older.

    Win 7

    Version 4.1.0.19

    Java 1.8.0_31

    Looks like a bug in 4.1 based on the thread below and the comments in the blog below:

    Printing in SQL Developer 4.1 output

    http://www.thatjeffsmith.com/archive/2015/05/SQL-Developer-version-4-1-feature-recap/

    Works very well in 4.0.3.16

    See you soon

    AJ

  • Bind the Variable for: 'No. Inline Validation errors displayed' existing?

    Hello

    Is there a variable corresponding to 'No Inline Validation errors displayed' APEX?
    I would test this variable combined with others for complex validation scenarios.

    Kind regards

    Christian

    Christian:

    You can use 'wwv_flow.g_inline_validation_error_cnt' to determine the number of online validation errors

    CITY

  • The Variables columns in a cursor

    Hi all.

    I have a Table that I don't know the structure.
    So I have a vision that shows me the structure of my table, but when I try to compile I can not, because the compiler identifies that a certain column isn & rsquo; t in my structure.
    Could someone help me?

    My code is:

    declare
    .. NUMBER;

    .. cursor CTABLE::OPEN is
    .. SELECT *.
    .. TABLE
    .. UPDATE;

    Start
    .. FOR reg_Table IN CTable::open LOOP

    -I have a vision that shows me the columns in my table
    -If the Column1 and Column2 it do not use the structure of the Table, they do not compile.

    .. IF (VIEW. COLUMN1 = S ') THEN
    .. : = reg_Table.Column1;
    .. ON THE OTHER
    .. : = 0 ;
    .. END IF;


    .. IF (VIEW. COLUMN2 = S ') THEN
    .. : = reg_Table.Column2;
    .. ON THE OTHER
    .. : = 0 ;
    .. END IF;
    end;

    Thank you.

    You must use dynamic sql statements. But you would still have the problem to know and be able to define the columns found/used in the tables, that you insert. For example, table1 has two columns, but table2 has four columns. How you build the insert statement. It can be done, but as I said it must be done using dynamic sql.
    Here's a start

    declare
     v_sql    varchar2(2000);
     type C_RefCURSOR ref cursor;
     c_cursor C_RefCURSOR;
     v_col_seq number :=1;
    begin
      v_sql := 'select ' ;
      for C1 in select * from YOUR_VIEW where table_name = "YOUR TABLE" LOOP
         v_sql := v_sql || C1.Column_name || ' as Col'||v_col_seq||', ' ;
      end loop;
      v_sql := substr( v_sql , 1, length (v_sql)-1) || ' from YOUR TABLE' ;
      OPEN c_CURSOR FOR V_SQL;
      LOOP
          fetch c_cursor ...
    
  • A better way to treat the form as a table with the variable column type?

    I wanted to make a column to return according to the status of a flag column as readonly. I have a column defined as follows in the report query.

    Decode (sys_flag, 'Y', APEX_ITEM. DISPLAY_AND_SAVE 3, TYPE_CODE, APEX_ITEM. SELECT_LIST_FROM_LOV (3, TYPE_CODE, 'LOV_TYPE_CODE_LOV')) AS TYPE_CODE

    To get the SRM process noting that column, I had to put this 'band of HTML code' to 'No', then the column attributes, I put:
    "Expression HTML" to "#TYPE_CODE #
    ' Display under "to"text display (saves the State).

    And then it took me to get new lines of work:
    "Default of Type" to "Expression of PL/SQL.
    'Default' to APEX_ITEM. SELECT_LIST_FROM_LOV (3, NVL(:P18_TYPE_CODE,'LOV_TYPE'), NULL, 'LOV_TYPE_CODE_LOV', ' NO')

    This makes large, however submit that it seems that the checksum of line used by MRU included the raw HTML generated by the APEX_ITEM package and not just the value of the column. I worked around this by including an element hidden checksum and creating a process that replaces the checksum generated automatically with my custom.

    Is there a better way to intercept this checksum, preferably before it is rendered on the page? I now hide the sum of hidden HTML control in the output HTML of another column, so it's a bit ugly. If not, is there an easier way to achieve what I'm looking for? I tried several combinations, and it seems to work better. It's just a shame there's no way to have a standard hidden column included in the SRM process.

    Hello

    I tried different possibilities and seems to run the following:

    Create a report questioning in NORMAL SQL function to help:

    SELECT
    APEX_ITEM.HIDDEN(1,EMPNO) || APEX_ITEM.TEXT(2,ENAME) ename,
    CASE WHEN DEPTNO = 10 THEN
     APEX_ITEM.HIDDEN(3, SAL) || SAL
    ELSE
     APEX_ITEM.TEXT(3, SAL)
    END SAL,
    EMPNO,
    DEPTNO || APEX_ITEM.MD5_CHECKSUM(ENAME, SAL) DETPNO
    FROM EMP
    

    Do not specify something special for column definitions.

    Create a button that submits the page.

    Create a PL/SQL process that runs "On submit - after calculations" and Validations, triggered by this button and using the following code:

    BEGIN
    APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:EMP:EMPNO,1:,|ENAME,2:SAL,3');
    END;
    

    I've done here: http://htmldb.oracle.com/pls/otn/f?p=55041:35

    Any element with the value of DEPTNO 10 has the value SAL, read-only, as otherwise it's editable. This is done by creating a hidden input field for the actual value, followed by the text version OR by creating a single entry field. This ensures that we have the correct number of SAL elements on the page.

    APEX_ITEM. MULTI_ROW_UPDATE is the "manual" version of the MRU that you would normally get with a form of table and works for above normal as sql based query reports. The format of this very strict is that you must always allow for two primary keys. See the text of presentation here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDFDACC

    Andy

  • How to pass the number object type to bind the variable in a select statement

    Hello

    I have a scenario like,

    UI, we store the values in the type of object, and this object type must be spent in a select query to retrieve the data accordingly.

    Is it possible to do so.

    If this isn't the case, please let me know how to take the values of object type and pass to the select query.

    Kind regards

    I found it,

    Object_name ('parameters1', 'parameter2');

Maybe you are looking for