SQL statement not showing good result set

Hello world

I have a statement:

Select to_date (extract (day of the to_date(begin_datum,'yyyy-mm-dd')) |) » -'|| extract (to_date(begin_datum,'yyyy-mm-dd') months) | » -'||
extract (year sysdate), 'dd-mm-yyyy') of fus_medewerkers;

which returns the following result:

12 FEBRUARY 09
7 DECEMBER 09
22 NOVEMBER 09
21 MAY 09
26 FEBRUARY 09
17 DECEMBER 09
01-SEP-09
17 DECEMBER 09
APRIL 4 09
7 JUNE 09
23 MAY 09
29 MAY 09
AUGUST 13 09
18 MARCH 09
1ST NOVEMBER 09
AUGUST 12 09
6 JANUARY 09
1 MARCH 09
AUGUST 2 09
16 AUGUST 09
6 NOVEMBER 09
23 MARCH 09
6 MAY 09
1ST NOVEMBER 09
1 MARCH 09
16 AUGUST 09
1 JANUARY 09
1ST DECEMBER 09
1ST OCTOBER 09
1ST OCTOBER 09
1ST OCTOBER 09
APRIL 1 09
APRIL 1 09
8 DECEMBER 09
APRIL 1 09
1 AUGUST 09
14 JUNE 09
2 JULY 09
APRIL 1 09
10 JANUARY 09
15 MARCH 09
7 APRIL 09
29 JANUARY 09
16 JUNE 09
21 OCTOBER 09

Now, I put a condition in my initial presentation as follows:

Select to_date (extract (day of the to_date(begin_datum,'yyyy-mm-dd')) |) » -'|| extract (to_date(begin_datum,'yyyy-mm-dd') months) | » -'||
extract (year sysdate), 'dd-mm-yyyy') of fus_medewerkers
where sysdate < = to_date (extract (day of the to_date(begin_datum,'yyyy-mm-dd')) |) » -'|| extract (to_date(begin_datum,'yyyy-mm-dd') months) | » -'||
extract (year sysdate), 'dd-mm-yyyy');

The result is:

7 DECEMBER 09
22 NOVEMBER 09
17 DECEMBER 09
01-SEP-09
17 DECEMBER 09
AUGUST 13 09
1ST NOVEMBER 09
16 AUGUST 09
6 NOVEMBER 09
1ST NOVEMBER 09
16 AUGUST 09
1ST DECEMBER 09
1ST OCTOBER 09
1ST OCTOBER 09
1ST OCTOBER 09
8 DECEMBER 09
21 OCTOBER 09

As you can see the line with sysdate (12 August 09) in my first result is not displayed in the second result set.
Can someone please tell me why this is so and how I could solve this problem?

Kind regards
Diana

What is the data type of "begin_datum"?

SYSDATE also contains an element of time, try this:

where trunc (sysdate) 

Published by: Alex Nuijten on August 12, 2009 20:29

Tags: Database

Similar Questions

  • New versions of Sql Developer not showing do not export progress

    Hi, actually I was using SQL Developer to effect considered. The version I used was 3.0.04 and took me to Version 4.0.1.14 in earlier versions of SQL Developer (3.0.04) when I exported the query results that I would see a current account of the number of records exported in the lower left corner of the window. With 4.0.1.14 when I export all I see is a progress bar below on the right with the word 'RUN', but I don't get a count of the number of how many records were exported. Is this something that has been removed from more recent updates of SQL Developer?  The account running has been a very useful for large ensemble export, so that we can have a clear idea of the progress of the export.  Please any body can advice me how turn on the feature that displays the number of records exported.

    View > Task progress will show you a number of records running for your exports

  • ADF Mobile Page with the data control of Web Service not showing latest results

    Hello

    I developed a simple mobile application of ADF. It has two functions members and subscriptions. These two pages are part of my Taskflow. On the members page I show all members in a list by using the Web Service method data Find command. In the list item have a listener property Set where I'm storing MemberId in a variable of pageFlowScope for action. On the subscription page, I have a bar graph that gets the data with the help of a Find method in control of data to the Web Service. The find method is based on a view created criteria which has a member ID of input parameter. in the model of ADFBC project. I connected the variable using the AMX page binding. The variable is being levied on the pageFlowScope variable.

    The page displays the chart first to a member. And shows the same graph for the other members. I printed the memberId variable and it shows the value of the respective members. But the cards are not get updated every time I select new Member.

    I use JDeveloper 11.1.2.4.0.

    Any suggestions?

    Thank you

    Mehabub

    Go to the Connections tab, and then click the Green plus sign on the central section - you need to add a 'invokeAction. Give it a name, and then select the iterator that built the table, and that's all you should have to do. The invokeAction fires whenever you visit the page and should update the list.

    Rich,

  • ORA-00900: SQL statement not valid (ColdFusion/Java)

    I found a lot of topics on this subject, but none seems to be done exactly what is happening to me.

    I have a ColdFusion/Java routine which displays applications for funding must be approved. When you click the action button, you can approve or disapprove. When the user presses the button, I get the error message by e-mail a copy of the trace. He shows me the invalid statement. I have copy and run in SQL * more on my Production database. He returned the planned line. How can this be? Confused.

    This is the track [link]https://dl.dropboxusercontent.com/u/3594970/1244Err.txt

    Oracle 11g on a Windows Server

    Deleted characters additional (PM User in my sample code) and the error disappeared.

  • After clone with an external isupplier, not showing not responsibilities

    Hello

    I'm on EBS financials 11.10.2 and I finished a clone that includes a server external isupplier. I ran auto config on the database, and then the external server, then the Server internal. Now, when I log in as any user, only the responsibility to the isupplier show. When I connect as a sysadmin, I have no responsibilities. I see that they are, but they are not intended. I think it's a profile or the value of configuration option, but I'm stuck. Any suggestions would be greatly appreciated.

    I found my problem. The profile node trust level option was put outside (3) at the level of the site. I put it 2 (internal) with a sql statement

    Update APPLSYS. Set profile_option_value = 2 FND_PROFILE_OPTION_VALUES where profile_option_id = 7511 and level_id = 10001

    and now it is fixed.

    Thanks anyway.

  • Remove duplicates from the result set

    Here's a challenge question that I was playing with a my free time during the work.

    I assume you have the basic HR example somewhere around (I hope is not in production).

    Let's say you want to get employees from the employees table whose name is similar to another employee last name.
    The easiest way is to join the two tables with a join condition that checks for the name and employee id. Here's what I came with.

    *************

    Select e1.last_name, e1.first_name b, e2.last_name c, e2.first_name d
    employees employees join e1 e2
    on (e1.last_name = e2.employee_id <>e2.last_name and e1.employee_id)
    order by one;

    ************

    The above query returns 10 rows. The first and the second are essentially the same. It is similarly, 3 & 4, 5 & 6, 7 and 8 and 9 and 10. The question is: is there a way that allows me to get rid of using only sql duplicate rows from the result set of this query. I sat on it for 15 minutes and I couldn't know. I'll try to watch my completed work once again.

    Example:

    SQL> column a format a10
    SQL> column b format a10
    SQL> column c format a10
    SQL> column d format a10
    SQL>
    SQL>
    SQL> select e1.last_name a , e1.first_name b, e2.last_name c, e2.first_name d
      2  from employees e1 join employees e2
      3  on ( e1.last_name = e2.last_name and e1.employee_id != e2.employee_id)
      4  where e1.employee_id < e2.employee_id
      5  order by a;
    
    A          B          C          D
    ---------- ---------- ---------- ----------
    Cambrault  Gerald     Cambrault  Nanette
    Grant      Kimberely  Grant      Douglas
    King       Steven     King       Janette
    Smith      Lindsey    Smith      William
    Taylor     Jonathon   Taylor     Winston
    
    SQL>
    
  • How to concatenate two sql statements?

    Hello

    How can I combine the following two sql statements so that the result of a line of the first statement appears before the lines of my second sql statement. The reason I need it is to order the lines correctly.

    Select the username, id
    some abusers
    where id = 0

    Select the username, id
    some abusers
    where id! = 0
    order by username

    Thank you
    j

    You should ask in the forum of the Apex:
    Oracle Application Express (APEX)

    Nicolas.

  • How to test a procedure returns the result set

    Hello

    I have a following code:

    {color: #0000ff} create or replace the TYPES of PACKAGING
    AS
    type cursorType is ref cursor;
    end;

    create or replace PROCEDURE GetAllCategories (p_cursor in the Types.cursorType)
    AS
    Start
    Open p_cursor for SELECT * CATEGORY;
    end; {color}

    I would like to test the procedure of * {color: #000000} visualization output resultset {color} *. How can I do with SQL Developer?
    In fact, when select RUN in SQL Developer, I got the following code:

    DECLARE
    P_CURSOR types.cursorType;
    BEGIN

    GetAllCategories (P_CURSOR = & gt; P_CURSOR);
    END;

    When I run it, it is successful but there is no result set displayed. However if I execute SELECT * FROM category only in the SQL Editor, I see the result set in the grid. Then where the result set did when he went through the procedure?

    Thanks in advance for any help.

    Published by: CarbonFiber Sep 22, 2008 20:52

    Is a simple way with sqlplus

    SQL> create or replace package types
      2  as
      3     type cursortype is ref cursor;
      4  end;
      5  /
    
    Package created.
    
    SQL> create or replace procedure getallemp(p_cursor in out types.cursortype )
      2  as
      3  begin
      4     open p_cursor for select * from emp;
      5  end;
      6  /
    
    Procedure created.
    
    SQL> var lcursor refcursor
    SQL>
    SQL> exec getallemp(:lcursor)
    
    PL/SQL procedure successfully completed.
    
    SQL> print lcursor
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20         10
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30         10
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20         10
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30         10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30         10
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10         10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20         10
          7839 KING       PRESIDENT            17-NOV-81       5000                    10         10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30         10
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20         10
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30         10
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20         10
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10         10
    
    14 rows selected.
    

    Thank you
    Knani.

  • Game of demand does not pick up the good period open to active fixed from the SQL statement

    Hello

    We have a demand that could kick off the simultaneous application of the value: Ixr: list of asset by period and Ixr: reserve book report.


    ON overall demand, we set the parameter: default period based on a SQL = select period_name from FA_DEPRN_PERIODS where book_type_code = 'PER2011' and period_close_date is null


    The query runs with the good period, until we open the new period, the game application will still come closed period.

    When I run this script on the database, it gives the correct name of the open period.


    Why all the demand does not pick up the open period?


    Rock


    Hello

    When planning, the parameter values that you gave when planning will not change.

    For the test, for a simultaneous program, I create a parameter and has given the value 100 tank and default type sql statement and the value as below.

    Select to_char (sysdate, 'dd-mon-yyyy hh24:mi:ss') of double

    If, at the time of the program, it shows a default value such as the date and time with seconds. Then I planned it for every minute.

    When you check in for each race it is seen the first time only, it does not.

    so in your case, you must plan its new after change of period.

    Hope this will help you...

  • Explain Plan shows not good results.

    Hi gurus,

    Please help me understand under question.

    Whenever I have do explain plan on any sql statements he says as explained but when retriving explain plan output it shows same results again and again.

    DB - 11 GR 2 Stand alone
    ASM - configured.
    OS - RHEL 6.2.


    SQL > select count (*) in the t2114;

    COUNT (*)
    ----------
    639292

    SQL > explain plan for select count (*) from t2114;

    He explained.

    SQL > @?/rdbms/admin/utlxpls.sql

    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Hash value of plan: 1497650422

    ----------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 6634. 524K | 2993 (19) | 00:00:01 |
    | 1. SORT ORDER BY | 6634. 524K | 2993 (19) | 00:00:01 |
    | 2. TABLE ACCESS BY INDEX ROWID | T2210 | 6634. 524K | 2947 (17) | 00:00:01 |
    |* 3 | INDEX RANGE SCAN | T2210_T | 6842. 108 (22) | 00:00:01 |
    ----------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    3 - access("T2210".") C490008000 ' =: SYS_B_0 AND "T2210".» C490009100 ' =: SYS_B_2.
    (AND "T2210". ' C301363300 '= TO_NUMBER (:SYS_B_1)).

    16 selected lines.


    SQL > explain the plan for
    2. SELECT T2114. C1 FROM T2114 WHERE ((T2114. C1000000001 =: 'SYS_B_0') AND (T2114. C536871442 =: 'SYS_B_1') AND (T2114. C536871477 =: 'SYS_B_2') AND ((: "SYS_B_3" - T2114.)) (C3) > =: 'SYS_B_4') AND ((: "SYS_B_5" - T2114.)) (C3) < =: 'SYS_B_6') AND (T2114. C1000000217 AS: 'SYS_B_7') AND (T2114. C536871478 <: 'SYS_B_8')) ORDER BY C1000000161 DESC,: 'SYS_B_9' ASC;

    He explained.

    SQL > SELECT * FROM TABLE (dbms_xplan.display);

    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Hash value of plan: 1497650422

    ----------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 6634. 524K | 2993 (19) | 00:00:01 |
    | 1. SORT ORDER BY | 6634. 524K | 2993 (19) | 00:00:01 |
    | 2. TABLE ACCESS BY INDEX ROWID | T2210 | 6634. 524K | 2947 (17) | 00:00:01 |
    |* 3 | INDEX RANGE SCAN | T2210_T | 6842. 108 (22) | 00:00:01 |
    ----------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    3 - access("T2210".") C490008000 ' =: SYS_B_0 AND "T2210".» C490009100 ' =: SYS_B_2.
    (AND "T2210". ' C301363300 '= TO_NUMBER (:SYS_B_1)).

    16 selected lines.

    In the future, please do not use * on object.
    Use the owner, object_type, object_name
    You avoid output unreadable in doing so.

    In the output that you show, you would need to know where the PUBLIC synonym points, by querying dba_synonyms or all_synonyms.
    If she SYS. Plan_table, you can drop ARADMIN. PLAN_TABLE.
    If there is no PLAN_TABLE SYS, you have to solve this problem.

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • % ROWCOUNT SQL does not return the expected result

    I have the following function within a package:

    --Update APPERY_JTI_deleted_USERS table:
    FUNCTION fn_updt_app_jti_dlt_usr(
        p_update_co      IN VARCHAR2,
        p_appery_user_id IN APPERY_JTI_deleted_USERS.appery_user_id%TYPE,
        p_outlet_code    IN APPERY_JTI_deleted_USERS.outlet_code%TYPE)
      RETURN NUMBER
    AS
    lv_sql       VARCHAR2(4000);
    lv_rowcount  NUMBER := 0;
    BEGIN
    
    lv_sql := 'UPDATE APPERY_JTI_deleted_USERS SET '||p_update_co||' = 1 WHERE '||p_update_co||' = 0 AND OUTLET_CODE = '''||p_outlet_code||''' AND APPERY_USER_ID = '''||p_appery_user_id||'''';
    
    --EXECUTE IMMEDIATE lv_sql;
    EXECUTE IMMEDIATE 'BEGIN ' || lv_sql || '; :z := sql%rowcount; END; ' USING OUT lv_rowcount ;
    
    RETURN lv_rowcount;
      
    EXCEPTION
    WHEN OTHERS THEN
      RETURN -1;  
    END fn_updt_app_jti_dlt_usr;
    
    

    The function called several times as part of a job. Basically, the main function (Say M), call a few functions (for example A1... A9). Each of these functions is to do something and updated the application using the above function. Therefore, each of the nine functions will call the above function with different parameters.

    The problem that I am facing is:

    First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.

    How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.

    I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same. I'm really confused, what Miss me here.

    I don't know if this is relevant. But for what it's worth, invoking the function above updates the SAME lines in the table appery_jti_deleted_users that the columns are different. So for all the work, the same lines need to be updated. Each function (A1... A9) will call the above function to update a different column of these lines.

    If you REALLY want to help you having US SHOW, not tell us:

    1. WHAT you do

    2. HOW to

    3. WHAT results you get

    4. WHAT results you expect to get

    First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.

    How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.

    Perhaps that the foregoing is true and maybe he's not. We have NO WAY of knowing because you don't SHOW US anything.

    I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same.

    Yet once you showed us NOTHING >

    You do NOT FOLLOW best practices when you use dynamic sql statements: the sql statement real so that you can print:

    1 SEE what's running - make sure there are no syntax errors, and it seems to be what you wanted

    2 EXECUTE/TEST manually - to see if he really runs without error and see what results it really give.

    3. FIX any syntax or other problems and retest it

    Instrument properly your code and you won't have the problems you are having.

    You should know by now what are the parameters are transmitted when you run the function. So, there are at least three sets of these parameters.

    So you should be able to:

    1 run the instrumented manually function three times

    2. see that all three SQL statements are

    3 manually run these instructions

    4. see that the number of lines is after each execution

    We have no idea of what the output of the function is every time you call it. Apparently, you have, if you save the results of the function somewhere, but you didn't post any of this info.

    We need real details to help you - just listen to your story is not enough.

  • MERGE or PL/SQL statement? (and ORA-30926: failed to get a stable set of rows in the source tables)

    Hi SQL & PL/SQL gurus...

    A bit of advice please...

    IM loading documents in the system... In this context, I have a routine that check the progress of loading (upload_records) against an existing table (supplier_records).  If the details differ so it updates, and if the folder does not exist, it inserts a new record...

    About 90% of the time, recording will be unchanged and the statement will do nothing...

    The challenge I have is that I get the error above fairly regularly, because (I think) there are simultaneous users, loading documents in the system... so, both tables change regularly...  The merge statement is below... but my question is: I would achieve anything by converting the merge statement into a PL/SQL loop that checks if the recordset contains a record that needs to either update or insertion? Would be the first simple quick check that reduction of 90% of the files works better, (with further processing if the folder must insert or update) and this would remove the error above, or the merge statement made the same thing anyway, and I should leave it as what? or is my incorrect merge statement and which contribute to the error?  The merge statement, if it finds a match, updates the record anyway, even if she didn't need to...  (which is not very effective)... However a pl/SQL loop will have to check if the record exists. check if it needs to be changed, change it if she does... Insert if the folder does not exist.

    MERGE statement is:

    MERGE INTO s suppliers

    USING (select distinct (sup_provision_id),

    provider,

    sup_acc_holder,

    sup_bank_acc,

    sup_bank_name,

    payments_upload sup_bank_branch

    where csv_id =: P20_CSV_ID) could

    WE (pu.sup_provision_id = s.supplier_id)

    WHEN MATCHED THEN

    GAME UPDATE

    s.SUPPLIER = pu.supplier,

    s.SUP_ACC_HOLDER = pu.sup_acc_holder,

    s.BANK_ACC_NO = pu.sup_bank_acc,

    s.BANK_NAME = pu.sup_bank_name,

    s.BRANCH_NO = pu.sup_bank_branch

    WHEN NOT MATCHED THEN

    INSERT (s.SUPPLIER_ID,

    s.SUPPLIER,

    s.SUP_ACC_HOLDER,

    s.BANK_ACC_NO,

    s.BANK_NAME,

    s.BRANCH_NO,

    s.CAT)

    VALUES (pu.sup_provision_id,

    able. Beg,

    Pu.sup_acc_holder,

    Pu.sup_bank_acc,

    Pu.sup_bank_name,

    Pu.sup_bank_branch,

    'S' );

    Thank you very much

    Richard

    Hi, Richard,.

    Richard Legge wrote:

    Hello.. Thanks for the reply...... The reason for the 'distinct' to ensure that the query retrieves only one line (based on the extraction of the full line, as you point out)... (so why he would never get more than one?) Well Yes... know that the media are not quite relevant...

    The reasoning is that out or 5000 records. 4000 will have the same provider... so want to retrieve a single record for what it (or other unique visitors who may be similar but have different criteria) and simply update the corresponding record, insert if there is no trace...

    Rgds

    Richard

    SELECT DISTINCT guarantees that no 2 rows will be exactly alike.  In other words, if you compare the 2 rows in the result set, either sup_provision_id supplier of GOLD supp_acc_holder for GOLD OR one of the other columns (or maybe 2 or more columns) will be different.  It does not guarantee that any 1 column will be unique.

    FUSION requires that, when a match is found, it should only be 1 line in the result set generated by the USING clause.  Given that the matching condition is

    WE (pu.sup_provision_id = s.supplier_id)

    This means that pu_sup_provision must be unique.  The ORA_30926 error occurs if it is not unique.  SELECT DISTINCT to ensure that complete lines in pu are unique, but it does not guarantee that any single column will be unique.

    Depending on your data and your needs, you may need to change the USING clause, so that sup_provision_id is unique.  You may need to add more conditions to the WHERE clause, or do a GROUP BY or use an analytic function such as ROW_NUMBER.

    If you need help, post a small example of data (that is, CREATE TABLE and INSERT statements for all the tables involved, as they are before the MERGER) and the exact results you want (that is, indicate which suppliers should contain after the MERGER).

    Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?

  • Cannot display the results to the database during "Update": SQL statement

    Hello

    I get this error trying to update a VO via the UI or BCBrowser.

    Cannot display the results to the database during "Update": SQL statement

    This is a default single front & right THAT VO creates on the object of the entity (Database Table)

    On the same table and with the same credentials of DB, I could update the record.

    Any guess on what went wrong?

    Thanks in advance for any help.

    p.s Jdev 11.1.1.6

    Journal:

    oracle.jbo.DMLException: Houston-26041: could not publish data from database in "Update": SQL statement "START the CAR UPDATED CarEO SET SEL_ITEM =: 1 WHERE TXN_NO =: 2 AND LOGID =: AND SEQNO = 3: 4 POLL DELIVERY_MODE, CERTIFICATION_REQ, SOFT_COPY_IND, SELITEM IN: 5,: 6,: 7,: 8; END; ».

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:583)

    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)

    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)

    at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)

    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)

    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)

    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)

    at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)

    at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)

    at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)

    at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)

    at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)

    to oracle.jbo.uicli.controls.JUNavigationBar$ NavButton.actionPerformed (JUNavigationBar.java:118)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Caused by: java.sql.SQLException: invalid column type

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:150)

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:399)

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:581)

    at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1765)

    at oracle.jbo.server.OracleSQLBuilderImpl.bindUpdateStatement(OracleSQLBuilderImpl.java:2243)

    at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:10524)

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:412)

    ... 52 more

    The problem is solved now.

    new columns added to the database table, after the creation of the entity object. Those changes were not picked up in the entity object.

    I found this difference after object entity with the DB Table comparison.

    And when I added these new columns to EO & VO, I don't get this error more.

    Thanks to all who tried to help

  • How to 'show' a static pseudo index using SQL statement select?

    Hello again,

    I have to post a time of 24 hours as an index. (00:00 - 23:00)
    It's easy, if data are available.

    But, if the data are not regularly exist on specific time (the time is not regular, IE: 00:00, 01:00, 05:00, 08:00, 10:00, 11:00, 23:00), then it of OK for a TABLE, but not for a CHART.

    Here is the story:

    I've written a SQL statement that can 'choose' what to display respectively the time available. The result will appear on the map: days or the time is used for the x-axis and the respective value on axis y.
    Example:
    + If the data consists of 'days' (ie: the last 5 days from now on, 16/07/2012, 17/07/2012, 18/07/2012, 19/07/2012, 20/07/2012), the chart will display these dates on the x-axis.
    + If the data consists of 'hours' (ie: only 1 day, hour 00:00 - 23:00), then the chart shows the hours on the x-axis.

    If the 'hours' are not regular, means: there is no data on the specific hours, the result of the query is not as regular, average: the value of X - axis "jumps" irregularly.

    Question:
    Is it possible to interrogate our own static value?
    for example:
    Select 'Hello' from dual-> result: 'Hello', 1 column, 1 line
    But how to display it into several lines, i.e.:

    Time
    *****
    0
    1
    2
    3
    4
    5
    ...
    ...
    23


    Note:
    the x-axis on the graph model can be customized only for 1 single mode, example: 'Days',
    but of course it will not appear correctly if the result of the query are "hours."
    This means: I have to find the workaround on the SQL query.


    DB: ORA 11


    Thank you and best regards.

    You can generate mulltiple rows if you use LEVEL and CONNECT BY:

    SQL> select level
      2  from   dual
      3  connect by level <= 10;
    
         LEVEL
    ----------
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    
    10 rows selected.
    
    SQL>  select sysdate+level-1
      2  from   dual
      3   connect by level <= 10;
    
    SYSDATE+LEVEL-1
    -------------------
    20-07-2012 12:48:26
    21-07-2012 12:48:26
    22-07-2012 12:48:26
    23-07-2012 12:48:26
    24-07-2012 12:48:26
    25-07-2012 12:48:26
    26-07-2012 12:48:26
    27-07-2012 12:48:26
    28-07-2012 12:48:26
    29-07-2012 12:48:26
    
    10 rows selected.
    
    SQL> select to_char(trunc(sysdate), 'hh24')+level-1
      2  from  dual
      3  connect by level <= 24;
    
    TO_CHAR(TRUNC(SYSDATE),'HH24')+LEVEL-1
    --------------------------------------
                                         0
                                         1
                                         2
                                         3
                                         4
                                         5
                                         6
                                         7
                                         8
                                         9
                                        10
                                        11
                                        12
                                        13
                                        14
                                        15
                                        16
                                        17
                                        18
                                        19
                                        20
                                        21
                                        22
                                        23
    
    24 rows selected.
    
  • Concatenate the result set into a SQL string

    Hi, I need help with the concatenation of a result set in order to avoid the duplication of data.

    I have 3 tables:

    SCRIPT
    ID - number PK
    DATE - day
    TITLE - Varchar2

    AUTHOR
    A_ID - number PK
    A_Name - Varchar2

    SCRIPT_AUTHOR
    ID - number - PK, FK of Script.ID
    A_ID - number PK, FK of Author. A_ID


    I need the list of all authors for each script on a single line, for the moment I have the following SQL code:

    Select S.Title, SA. A.ID
    SCRIPT S, SCRIPT_AUTHOR SA
    WHERE SCRIPT.ID = SCRIPT_AUTHOR.ID


    and as expected it's returning a dataset as follows:-give me 2 lines in this case for a script:

    S.TITLE, SA. A_ID
    1, 1
    1, 2

    What I'm really after is a result set that combines the two authors in this case a file: 1, 1:2, so I don't have 1 line by script.
    Scripts can have many authors, and I want to do it for a lot of scripts at a time.

    I hit a blank on how to do it, is it possible to do it with SQL?

    Thank you very much

    p.s. help: Oracle Database 10g Enterprise Edition release 10.2.0.3.0

    Hello

    This is called 'aggregation of chain.
    [AskTom.oracle.com | http://asktom.oracle.com/pls/asktom/f?p=100: 11:0:P11_QUESTION_ID:2196162600402] shows several ways to do so.

    I recommend the first, the function defined by the user STRAGG, that you can copy from this page.

    Once you have installed STRAGG, your query is simply

    Select       S.Title
    ,       STRAGG (SA.A.ID)     AS sa_id_list
    FROM       SCRIPT     S
    ,       SCRIPT_AUTHOR SA
    WHERE       SCRIPT.ID = SCRIPT_AUTHOR.ID
    GROUPB BY s.Title;
    

    On Oracle 10 (and more) you can have a similar function, the WM_CONCAT (property WMSYS), already installed.
    WM_CONCAT is not documented, so you can't use it in your Production applications.

Maybe you are looking for

  • After installing Windows 7, linking my old drive with Windows XP on it will let see me all the data in the drive?

    Original title: installation of Windows 7. I install Windows 7 on a new drive. My old drive is Windows XP and all my old data. IF I had to unplugging the old drive and install Windows 7 on the new drive and then plug the old drive and restart Windows

  • The taskbar problems

    original title: weird problems of taskbar I have a HP Compaq dc5750 Small Form Factor running Windows Vista Business 32-bit with an AMD Athlon 64 processor. Whenever I use my computer for a long time, strange things happen with my taskbar. On the top

  • Cannot access some sites behind the pix515e

    I started my CISCO PIX 515e in July 2004 with a minimum configuration. The only change I made was to introduce the syslog and 3COM tftp server. Two weeks after my Internet (browsers) users (inside) began to have problems of access to certain sites fo

  • database time zone issues

    HelloI fell on the database time zone parameter that can be given with the CREATE DATABASE statement. However, I have found that not all databases under my control have the same time zone (some are custom databases (DBCA), some are base model). But a

  • Download fails osx 10.11.4

    I'm Beta testing the latest OSX 10.11.4 beta 4. I can't update all Adobe products. They continue to not not right at the end.