Number of rows in a data view

Hello

I have a data view that is bound to a table in a MS Access database.

How can I determine the number of rows that are in the data view?

Thank you

Chris

OK, I see the question... to version 8 of Acrobat sourceset Dom was locked so that if you try and change you will get security errors.

There is a good explantion in blog of Stefan Cameron located here:

http://Forms.stefcameron.com/2006/12/07/better-form-design-with-XFA-25/

Down is a solution for sunbathing with current versions.

The other option is to target your form for an earlier version, when this restriction did not exist. In the properties of the form vhoose a target version of the 7.0.5 and your code will work fine (no error).

Paul

Tags: Adobe LiveCycle

Similar Questions

  • Count the number of rows returned from each view in USER_VIEWS

    For each USER_VIEWS view, I would return the name, creation date, last modified dateand the number of rows returned by this view.

    Here's what I have so far:
    col object_name format a20
    select 
    object_name, 
    created, 
    last_ddl_time
    from user_objects
    where object_type = 'VIEW'
    Returns:
    OBJECT_NAME          CREATED   LAST_DDL_TIME
    -------------------- --------- -------------
    AISLE_AVG            11-FEB-12 11-FEB-12     
    COURSE_AVG           11-FEB-12 20-FEB-12     
    EXE_12_VIEW          11-FEB-12 21-FEB-12     
    L1_P2                17-FEB-12 17-FEB-12     
    L1_P3                17-FEB-12 17-FEB-12     
    L1_P4                17-FEB-12 17-FEB-12     
    L1_P5A               17-FEB-12 17-FEB-12     
    L1_P5B               17-FEB-12 17-FEB-12     
    LAB3_1A              12-FEB-12 20-FEB-12     
    LAB3_1B              12-FEB-12 20-FEB-12     
    LAB3_2A              12-FEB-12 20-FEB-12     
    LAB3_2B              12-FEB-12 20-FEB-12     
    LAB5_1               19-FEB-12 19-FEB-12     
    LAB5_2               19-FEB-12 19-FEB-12     
    LAB5_3               19-FEB-12 19-FEB-12     
    LAB5_4               19-FEB-12 19-FEB-12     
    LAB5_5               19-FEB-12 19-FEB-12     
    LAB5_TIMES           19-FEB-12 19-FEB-12     
    LAB6_1               19-FEB-12 19-FEB-12     
    LAB7_VIEW            20-FEB-12 20-FEB-12     
    PROGRAMS             11-FEB-12 21-FEB-12     
    STUDENT_GPA          11-FEB-12 21-FEB-12     
    
     22 rows selected 
    How can I add a last column that counts the number of rows returned by this view?

    EDIT - here is a dump of my paintings, and here are my views.

    Edit2 - this is possible by using the DECODE function, by chance?

    The function...

    CREATE OR REPLACE FUNCTION view_row_count (view_name VARCHAR2)
    RETURN NUMBER
    AS
    retval NUMBER;
    BEGIN
    EXECUTE IMMEDIATE
    'select count(*) from '||view_name INTO retval;
    RETURN retval;
    END view_row_count;
    /
    

    And now the query...

    select
    object_name,
    created,
    last_ddl_time,
    view_row_count(object_name) as view_row_count
    from user_objects
    where object_type = 'VIEW'
    
  • How can I get number of rows in DB for view with "only up to line number.

    Hi all

    I use jdeveloper 11.1.1.3.0

    in the development of the object view, only until the line number is set to 100, but it has 1000 row in DB.

    now page jspx, I need to get the number of rows in db (1000), how can I get it?

    If I get iterator or view are of the object status is not true, it returns the value 100.

    How can I get 1000?

    Given that you have set the limit line number for the VO, VO will always and forever don't have 100 records or less. If you want the total number in the comic book, you need to create an another VO that is not the count (*) or one that does not limit the number of rows.

    John

  • How Restict number of rows to download data in the excel worksheet

    Hello
    My requirement is that I m showing 50 best seller in my dashboard. but when we click on download to excel and then download all 500 lines. I want to restrict the download of all data and want to view displays only the dashboard sheet data is excellent. (ex if 50 best sellers are selected then only 50 rows is downloaded.)

    Published by: 941334 on June 18, 2012 06:15

    Hello

    U just above commenst xml on your instanceconfig.xml file below and then test it.

    (1) prior to this step take a return to the top and start changes
    Keep it under xml commnents n/b


    50

    in the same way of the PivotTable as
    then save it and re start it services presentation bi so it will work as you expected.

    For info to learn more check out my blog
    http://obieeelegant.blogspot.SG/2011/09/unable-to-export-all-rows-from-request.html

    Note: the size it my vary based on the calculation of your view (rows, columns, section, cell) you can increase it.

    hope this will help you.

    Thank you
    Deva

  • Displays the number of rows in the table displaying a named criteria query data

    I created a test named for my View, called 'Criteria1' and Criteria1 to create a group of ADF with Table query. I want to display the number of rows in result when a search is performed. How can I do?

    Thanks in advance,
    Tom

    As mentioned, you can add outputText and you must give OutputText partialTriggers as query component your Id. Thus, when you give a search on the query component, it will refresh the outputText with the number of lines.


    ID = "ot1" partialTriggers = "id of the component of motion here" / > ""

  • Text box layout problem - and the number of rows displayed

    Hello

    Wonder if you can help with my 2 problems

    1. when I create text boxes, the label is displayed to the left of the text box. How can I display label above the text box
    CGH

    Label
    TextBox

    Instead of

    Text box label

    2. when I ask report showing my data, that it shows that 15 records per page, for the next set of records, I need to click on the following icon at the bottom of the table to go to the next page.
    How can I view all on the same page?

    Thanks for help

    1. simply check this using the Horizontal / Vertical alignment of attribute in the section of the label of the element of the Page definition.

    2. in the report of the attributes, the value of the plan of paging None; and the number of rows and number of maximum lines to more than the number of rows that will be returned by the report query.

    (You should only ignore this last you really know that the number of lines make this a reasonable option.) Nobody is going to want to scroll through thousands of lines or wait 5 minutes for total information overload. You wouldn't be popular with your admins/ISP network due to the excessive bandwidth consumed either.)

  • How to determine the number of rows in the database and save the result to a local variable?

    Hello

    I'm a newbie in the use of TestStand, databases and SQL, and now I've met difficulties. I use TestStand 2014 (32 bit).

    I have a need to know the number of rows in a database and save that number in a local variable. I tried to practice using the database of the Types of step provided with TS. I tried to use the following in a SQL statement:

    Locals.NumberOfRows = ("SELECT COUNT (*) FROM TEST_TABLE")

    It returns an error: specified value is not the expected type. My goal is possible in this way, or I'm doing this completely wrong?

    -RautSa

    Thank you for your response, Norbert. I have a database of who wins new values at random, and sometimes I need the exact number of rows in this table.

    I managed to achieve my goal by using the SQL statement: "SELECT COUNT (*) as Rowcount OF TEST_TABLE", followed by a data GET operation, which records that number of lines in a local variable.

    -RautSa

  • Export of DataPump API - number of rows exported using

    Hello

    I'm working on the procedure to export data in the table before deleting the partition. It will be run by the Scheduler of the data, that's why I want to run the datapump job using the API.

    I wonder, if it is possible to get the number of rows exported. I would compare with the number of rows in a partition before you delete the partition.


    Thank you

    Krystian

    Hello

    Don't know exactly how you want the number of rows per partition that have been exported, but here are a few ideas:

    1. create a log file by using 'add_file ':

    -Add a log file

    dbms_datapump.add_file (h, ' DEPTJOB.log ', a', NULL,)

    dbms_datapump.Ku$ _file_type_log_file);

    It is also in my example included below.  Here is the content after the DEPTJOB.log workload (situated in Oracle Directory object would be "in my example):

    $ cat /tmp/DEPTJOB.log

    Departure 'SCOTT '. "" DEPTJOB ":

    Object type TABLE_EXPORT/TABLE/TABLE processing

    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

    . . "exported"SCOTT" DEPT': 'SYS_P1581' 5,929 KB 2 lines

    . . "exported"SCOTT" DEPT': 'SYS_P1582' 5,914 KB 1 lines

    . . "exported"SCOTT" DEPT': 'SYS_P1583' 5,906 KB 1 lines

    Table main 'SCOTT '. "' DEPTJOB ' properly load/unloaded

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

    Empty the files together for SCOTT. DEPTJOB is:

    /tmp/Dept.dmp

    Job 'SCOTT '. "" DEPTJOB "managed to 00:00

    You can then review or extract the information from the log file.

    2. save the master table and the query for the busy lines.

    Use the parameter "KEEP_MASTER":

    -Keep the main table to be deleted after employment ends

    dbms_datapump.set_parameter(h,'KEEP_MASTER',1);

    Here's my example, the request to the main table is at the end.

    $ sqlplus scott/tiger @deptapi

    SQL * more: version 12.2.0.0.2 Beta on Fri Jan 22 12:55:52 2016

    Copyright (c) 1982, 2015, Oracle.  All rights reserved.

    Last successful login time: Friday, January 22, 2016 12:55:05-08:00

    Connected to:

    Database Oracle 12 c Enterprise Edition Release 12.2.0.0.2 - 64-bit Beta

    With the options of partitioning, OLAP, advanced analytics and Real Application Testing

    Connected.

    SQL > SET FEEDBACK 1

    SQL > SET 10 NUMLARGEUR

    SQL > SET LINESIZE 2000

    SQL > SET TRIMSPOOL ON

    SQL > SET TAB OFF

    SQL > SET PAGESIZE 100

    SQL > SET SERVEROUTPUT ON

    SQL >

    SQL > Rem save on the old table of scott.dept

    SQL > dept and rename it dept_old.

    Renamed table.

    SQL >

    SQL > Rem re-create it with partitions

    SQL > CREATE TABLE dept (deptno NUMBER varchar (14) dname, loc varchar (13)) PARTITION INTO 3 PARTITIONS HASH (deptno)

    2.

    Table created.

    SQL >

    SQL > Rem fill the dept table

    SQL > insert into dept select * from dept_old;

    4 lines were created.

    SQL >

    SQL > Rem now create datapump job export SCOTT. DEPT. using the API

    SQL > DECLARE

    2: NUMBER;         -Handle Datapump

    3 jobState VARCHAR2 (30);   -To keep track of job status

    4 ind NUMBER;         -Index of the loop

    5 the ku$ _LogEntry;   -For error messages and work in PROGRESS

    6 js ku$ _JobStatus;  -The State of the work of get_status

    7 jd ku$ _JobDesc;    -The get_status job description

    8 m ku$ _Status;     -The status returned by get_status object

    9 sql_stmt VARCHAR2 (1024);

    nom_partition 10-VARCHAR2 (50);

    11 rows_completed NUMBER;

    12

    BEGIN 13

    14-

    15 run the Installer based on the operation to perform.

    16-

    17 h: = dbms_datapump.open ('EXPORT', 'TABLE', NULL, 'DEPTJOB', NULL);

    18 dbms_datapump.add_file (h, 'dept.dmp', 'd', NULL,

    dbms_datapump.Ku$ _file_type_dump_file 19, 1);

    20

    21    --- Add a logfile                                                         

    22 dbms_datapump.add_file (h, ' DEPTJOB.log ', a', NULL,)

    23 dbms_datapump.ku$ _file_type_log_file);

    24

    25 dbms_datapump.metadata_filter (h, 'SCHEMA_EXPR', ' IN ("SCOTT") ");

    26 dbms_datapump.metadata_filter (h, 'NAME_LIST', "'DEPT"');

    27

    28

    29-

    30 start work.

    31-

    32 dbms_datapump.set_parameter (h, 'SILENT', 'banner');

    33

    34 -keep the main table to be deleted after employment ends

    35 dbms_datapump.set_parameter(h,'KEEP_MASTER',1);

    36

    37 dbms_datapump.start_job (h);

    38

    39-

    40 - run to grabbing the output of the job and write in the output log.

    41-

    42 jobState: = "UNDEFINED";

    43 WHILE (jobState! = "COMPLETED") AND (jobState! = "STOPPED")

    44 LOOP

    45 dbms_datapump.get_status (h,

    dbms_datapump.Ku$ _status_job_error 46.

    dbms_datapump.Ku$ _status_wip 47, -1, jobState, m);

    48

    49      --

    50. If we received messages WIP or error for the work, display them.

    51      --

    52 IF (BITAND(sts.mask,dbms_datapump.ku$_status_wip)! = 0)

    53 THEN

    54: = sts.wip;

    55 ON THE OTHER

    56 IF (bitand(sts.mask,dbms_datapump.ku$_status_job_error)! = 0)

    57 THEN

    58: = sts.error;

    59 ON THE OTHER

    the 60: = NULL;

    61 END IF;

    62 END IF;

    63

    64 the IS NOT NULL IF

    65 THEN

    66 ind: = the. FIRST;

    67 then AS ind IS NOT NULL

    68 LOOP

    69 dbms_output.put_line ((ind). LogText);

    70 ind: = the. Next (IND);

    LOOP END 71;

    72 END IF;

    73 END LOOP;

    74

    75-

    76 - release work.

    77-

    78 dbms_datapump.detach (h);

    79

    80-

    81. all exceptions that spread at this point will be captured.

    82 - the details are extracted from get_status and displayed.

    83-

    EXCEPTION OF 84

    85, SO THAN OTHERS THEN

    BEGIN 86

    87 dbms_datapump.get_status (h,

    dbms_datapump.Ku$ _status_job_error, 0-88,.

    89 jobState, sts);

    90 IF (BITAND(sts.mask,dbms_datapump.ku$_status_job_error)! = 0)

    91 THEN

    the 92: = sts.error;

    93 the IS NOT NULL IF

    94 THEN

    95 ind: = the. FIRST;

    96 although ind IS NOT NULL

    LOOP OF 97

    98 dbms_output.put_line ((ind). LogText);

    99 ind: = the. Next (IND);

    100 END LOOP;

    101 END IF;

    102 END IF;

    103

    BEGIN 104

    105 DBMS_DATAPUMP. STOP_JOB (m, 1, 0, 0);

    EXCEPTION OF 106

    107. WHEN OTHER NULL THEN;

    END 108;

    109

    110 EXCEPTION

    111, SO THAN OTHERS THEN

    112 dbms_output.put_line ('ORA-00000: an unexpected exception during ' |)

    113 ' Manager of exceptions. ' ||

    114 ' sqlcode = ' | TO_CHAR (SQLCODE));

    END 115;

    END 116;

    117.

    Departure 'SCOTT '. "" DEPTJOB ":

    Object type TABLE_EXPORT/TABLE/TABLE processing

    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

    . . "exported"SCOTT" DEPT': 'SYS_P1581' 5,929 KB 2 lines

    . . "exported"SCOTT" DEPT': 'SYS_P1582' 5,914 KB 1 lines

    . . "exported"SCOTT" DEPT': 'SYS_P1583' 5,906 KB 1 lines

    Table main 'SCOTT '. "' DEPTJOB ' properly load/unloaded

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

    Empty the files together for SCOTT. DEPTJOB is:

    /tmp/Dept.dmp

    Job 'SCOTT '. "" DEPTJOB "managed to 00:00

    PL/SQL procedure successfully completed.

    SQL >

    SQL > table main query Rem for number of lines completed

    SQL > column nom_partition format a10

    SQL > format 9999 column lines

    SQL > SELECT nom_partition, COMPLETED_ROWS FROM SCOTT . DEPTJOB WHERE BASE_OBJECT_NAME = "DEPT";

    PARTITION_ COMPLETED_ROWS

    ---------- --------------

    SYS_P1581 2

    SYS_P1583 1

    SYS_P1582 1

    3 selected lines.

    SQL >

    SQL > "EXIT";

    3. you might even extract information of the call from the command line:

    $ sqlplus scott/tiger @deptapi.sql | grep 'exported ' | AWK ' {print "Table:" $4, 'charge' $7, $8} '

    Table: 'SCOTT '. "" DEPT ":"SYS_P1581"loaded 2 rows

    Table: 'SCOTT '. "' DEPT ': 'SYS_P1583' loaded 1 lines

    Table: 'SCOTT '. "' DEPT ': 'SYS_P1582' loaded 1 lines

  • number of rows in table is not updated in RPD obiee 11.1.1.9?

    Hello

    I'm working on obiee 11.1.1.9.

    When I'm trying to update the rows in the table to the RPD, I'm getting following error. ;

    err11.jpg

    I tried so many times. But still I don't get number of rows tables.

    Please help me.

    Thanks in advance,

    A.Kavya.

    Hello

    As you say, I checked the side DB. I am using Toad. while I see the table & script data in abrowser schem, I get the error message like "access violation at address 01c688df in module toad.exe" on the opening of the browser (73231) editor or contours. to do this, I installed the new version of Toad .so I did nt get any errors at the level of the RPD. I get the number of rows updated successfully.

    Thank you best regards &,.

    A.Kavya.

  • Error creating a salary. ORA-01422: exact fetch returns more than the requested number of rows in the hr_maintain_proposal_swi procedure insert_salary_proposal package

    Hi all

    We try to add new proposal for a salary of some employees from form August 1, 2015 (the Date of the beginning of employee)

    There is no existing salary proposal doesn't exist for these employees.

    We get below error.


    ORA-01422: exact fetch returns more than the requested number of rows in the hr_maintain_proposal_swi procedure insert_salary_proposal package


    Help, please.

    Thank you

    Tarun

    Hi John,.

    If it helps, take a look at the following note:

    ORA-01422 exact Fetch returns more than number of lines requested in Hr_maintain_proposal_swi (Doc ID 1673527.1)

    Kind regards

    Rajen

  • Dynamic calculation of the number of days between two dates in a table

    Hello

    I'm working on request where I dynamically calculate the number of days between two dates in a table.

    The calculation must be dynamic, i.e., when I recover the Start_date and End_date and move to the field following (call_duration) in the same row, the difference must be calculated dynamically in this area and make sure the field read-only.

    APEX version: 5.0

    Hi BO123,

    BO123 wrote:

    Hello

    I'm working on request where I dynamically calculate the number of days between two dates in a table.

    The calculation must be dynamic, i.e., when I recover the Start_date and End_date and move to the field following (call_duration) in the same row, the difference must be calculated dynamically in this area and make sure the field read-only.

    APEX version: 5.0

    one of the way to do this by calling ajax on change of end_date.

    See the sample code given below to fetch the resulting duration and making the field read only after calculation

    Step 1: Change your page

    under CSS-> Inline, put the code below

    .row_item_disabled {
      cursor: default;
      opacity: 0.5;
      filter: alpha(opacity=50);
      pointer-events: none;
    }
    

    Step 2: Create on demand Ajax process I say CALC_DURATION

    Please check Procces Ajax, see line 6.7 How to assign a value to the variable sent by ajax call

    Declare
      p_start_date  date;
      p_end_date    date;
      p_duration number;
    Begin
      p_start_date  := to_date(apex_application.g_x01);
      p_end_date    := to_date(apex_application.g_x02);
    
       --do your calculation and assign the output to the variable p_duration
      select p_end_date - p_start_date into p_duration
        from dual;
    
      -- return calculated duration
      sys.htp.p(p_duration);
    End;
    

    Step 3: Create the javascript function

    Change your page-> the function and the declaration of the Global Variable-> put the javascript function

    You must extract the rowid in the first place, for which you want to set the time, see line 2

    assuming f06, f07 and f08 is the id of the start date, and end date columns respectively, and duration

    See no line no 8 how set the value returned by the process of ajax at the duration column

    Replace your column to the respective column identifiers in the code below

    function f_calulate_duration(pThis) {
      var row_id  = pThis.id.substr(4);
      var start_date = $('#f06_'+row_id).val();
      apex.server.process ( "CALC_DURATION", {
      x01: start_date,x02: $(pThis).val()
    }, { success: function( pData ) {
    // set duration to duration column
    $('#f08_'+row_id).val(pData);
    // disable duration column
    $("#f08_" + row_id).attr("readonly", true).addClass('row_item_disabled'); }
    });
    }
    

    Step 4: choose the end date call the javascript function

    Go to report attributes-> edit your Date column end-> column-> Attrbiutes element attributes-> put the code below

    onchange="javascript:f_calulate_duration(this);"
    


    hope this helps you,

    Kind regards

    Jitendra

  • Number of rows in each partition is displayed with a NULL value for a table partitioned in user_tab_partitions. Why?

    I created a table and partitioned on the date of the entry and added a local partitioned index.

    Now, I use a query to extract "num_rows" of user_tab_partitions to know the number of rows in each partition.

    Getting this value as null num_rows, wonder why?

    After looking to explain the Plan after interrogation ("select * from my_table1 where entry_date = 1 January 2015" ;))

    to find out if she actually partitioned table and its data in different partitions, I interpreted in effect because the query plan had a line like Partition_range (Single).

    My Question is:

    (a) is actually partitioned data (have I misinterpreted the Explain plan)

    (b) why is the num_rows null column in the query (Pasted below)

    (c) also in addition what difference it would have been if I had created a Global Index instead of the Local Index in my case?

    The following code Snippet:

    ----------------------------------------------------------------------------------------------

    create the table my_table1
    (
    roll_no number constraint my_table1_pk primary key,
    date of entry_date
    )
    partition of range (entry_date)
    (
    PARTITION data_p1 VALUES LESS THAN (TO_DATE (December 31, 2014 ',' DD-MM-YYYY ""));
    PARTITION data_p2 VALUES LESS THAN (MAXVALUE)
    );


    create an index only my_table1_indx on my_table1 (entry_date) local;

    ----------------------------------------------------------------------------------------------

    I now insert two lines:
    insert into my_table1 values (1, to_date ('01-01-2015', ' dd-mm-yyyy'));
    insert into my_table1 values (2, to_date('01-02-2015','dd-mm-yyyy'));

    ----------------------------------------------------------------------------------------------

    These have been inserted successfully, now using the query below shows num_rows column as null. I don't know why?

    SELECT table_name, num_rows, high_value, nom_partition
    Of user_tab_partitions
    where table_name = 'MY_TABLE1 '.
    ORDER BY table_name, nom_partition;

    ----------------------------------------------------------------------------------------------


    (a) is actually partitioned data (have I misinterpreted the Explain plan)

    Yes, it is partitioned. You can query this particular partition SELECT * FROM my_table1 (data_p1) PARTITION to check that.

    (b) why is the num_rows null column in the query (Pasted below)

    As already mentioned that you have not collected statistics.

    (c) also in addition what difference it would have been if I had created a Global Index instead of the Local Index in my case?

    In fact, you have created two types of indexes without knowing (can be)! One is not partitioned (although this column is not partition key) and another is partitioned (LOCAL). They are MY_TABLE1_PK and MY_TABLE1_INDX. You can check that USER_INDEXES.

    You can read this article to get an early jump on the partitioning of decision. Partition: Partition decisions

  • Number of Saturdays between two dates

    Hello

    How can I get number of Saturdays between two dates, including the two dates?

    for example number of Saturdays between 09/05/2014 and 10/05/2014 is five

    Help, please

    I use oracle 10g

    SQL> with t
      2  as
      3  (
      4  select to_date('05/09/2014 ', 'dd/mm/yyyy') from_dt
      5       , to_date('05/10/2014 ', 'dd/mm/yyyy') to_dt
      6    from dual
      7  )
      8   select to_char(from_dt + (level-1), 'fmDay') day_
      9        , count(*) cnt
     10     from t
     11  connect
     12       by level <= to_dt - from_dt + 1
     13    group
     14       by to_char(from_dt + (level-1), 'fmDay');
    
    DAY_             CNT
    --------- ----------
    Saturday           5
    Thursday           4
    Tuesday            4
    Friday             5
    Wednesday          4
    Monday             4
    Sunday             5
    
    7 rows selected.
    
    SQL>
    
  • See the number of rows affected the performance of sqlplus to a sql file

    Hello

    It's just we have a sql file that contains a bunch of select/update/insert statements.

    I have a unix script that calls sqlplus on this sql file. However, at the exit I don't get the number of rows affected.

    Without adding any code in the input sql file, how can I change the code of sqlplus shell script to print the number of rows affected for each statement in the sql file?

    ${ORACLE_HOME}/bin/sqlplus -L >> ${LOG_FILE} 2>&1  << EOF
      ${ORAID}/${ORAPASS}@${ORAINS}
      whenever sqlerror exit sql.sqlcode;
      set echo on;
      set feedback off;
      set serveroutput on;
      @${SQL_FILE};
      exit;
    EOF
    RC=$?
    

    The SQL_FILE of entry content is:

    select 12 "col1" from dual;
    select 'abcd' "col2" from dual;
    select;
    select 13 'col3' from dual;
    

    The result of the race of sqlplus is (LOG_FILE):

    SQL*Plus: Release 11.2.0.2.0 Production on Fri Jun 6 14:28:00 2014
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter user-name: 
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    
    SQL> SQL> SQL> SQL> SQL> SQL> select 12 "col1" from dual;
    
          col1
    ----------
            12
    SQL> select 'abcd' "col2" from dual;
    
    col2
    ----
    abcd
    SQL> select;
    select
         *
    ERROR at line 1:
    ORA-00936: missing expression
    
    
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    

    Thank you

    Srinivas - y.

    1. echo setting
    2. Set feedback off;

    use

    Set of feedback on

  • number of rows fetch are not even

    Hi all


    I'm new to sql/plsql

    Oracle version 11R2
    RHL 5.0 OS


    I'm deleting all rows in the parent table as well as children tables based on some criteria to date.

    the parent BE_STATUS table contains a column OOC_DT. based on the OOC_DT I get BE_STATUSin the parent Table rows.

    other children tables DOES NOT have OOCDT column but meet BENo. and BEDT WHO are also in PARENT TABLE BESTATUS.


    So I get all the be_no, * be_dt * of BE_STATUS based on the OOC_DT column as below
    select distinct(count(*)) from be_status where ooc_dt between '31-mar-10' AND '24-dec-10';
    
    (COUNT(*))
    ----------
     65074 
    and I create a temporary table based on the above query as
    create table temp as select be_no, be_dt from be_status where ooc_dt between '31-mar-10' AND '24-dec-10';
    table created.
    and then I count the number of rows in the temporary table
    select distinct(count(*)) from temp;
    (COUNT(*))
    ----------
     65074 
    so there are around 51 children tables that have the BE_NO AND BE_DTcolumn.

    If the total number of lines in the temp must be equal to the total of all the lines in each column according to the above criteria.

    It's
    select distinct(count(*)) from be_penal  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
            64 
    
    select distinct(count(*)) from be_fine  where (be_no,be_dt) in (select be_no,be_dt from temp);
    
    (COUNT(*))
    ----------
            62
     
    select distinct(count(*)) from be_cash_lic  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
            23 
    
    select distinct(count(*)) from c_cl_be  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
             2 
    select distinct(count(*)) from chex where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
             0 
    select distinct(count(*)) from amend_q where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
             0 
    
    select distinct(count(*)) from be_perm  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
           889 
    select distinct(count(*)) from exam_instr where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
           690
    
    select distinct(count(*)) from c_rms_mesg  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
         64982
    
    select distinct(count(*)) from item_duty_fg  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
        398129 
    
    select distinct(count(*)) from a_item_det  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
    ----------
         31453
    select distinct(count(*)) from item_det  where (be_no,be_dt) in (select be_no,be_dt FROM temp);
    (COUNT(*))
    ----------
        622271
    so, as you can see the TEMP TABLE contains only * 65074 *. Therefore the sum of the numbers of all of the above tables should be * 65074 * but only item_det contains
    * 622271 * lines.


    I have made a mistake in counting the records individually?

    waiting for your helpful answer

    Thanks and greetings

    Not quite sure, I followed your question, but a glaring fault in your codes...

    between '31-mar-10' AND '24-dec-10';
    

    dates should be treated as dates, not the chains and left us 2 years of numbers of programming standards waaay back in the 90's when everyone fixed these issues in the context of the challenges of the Millennium bug.

    between to_date('31-mar-2010','DD-MON-YYYY') AND to_date('24-dec-2010','DD-MON-YYYY');
    

Maybe you are looking for