Getting crazy selecting dates on a mysql table (long)

Hi all,
I have a problem that is driving me crazy.
I have a table containing 2 columns (QUOTATION and DATE).
I want to extract only the records that have the date falling
between
a specific range.
I've set 2 variables to hold the two dates:
$start_date=date
("Y-m-d",mktime(0,0,0,date("m"),date("d")-90,date("Y")));
$end_date=date
("Y-m-d",mktime(0,0,0,date("m"),date("d"),date("Y")));
But when I run this query:
SELECT quotation, date FROM mytable WHERE date BETWEEN
{$start_date}
AND {$end_date} ORDER BY date DESC";
I get ... nothing selected.
If I use:
SELECT quotation, date FROM mytable WHERE date >
{$start_date} ORDER
BY date DESC";
I get _all_ records: the records before and after the
$start_date.
Here is my little script:
=====================================
<?php
mysql_select_db($database_mmm_conn, $mmm_conn);
$quotation = (isset($_GET['quotation'])) ?
mysql_real_escape_string($_GET['quotation']) : "";
if ($quotation)
$quotationquery=$metallo;
else {
$quotationquery='default_quotation';
$start_date = (isset($_GET['start_date'])) ?
mysql_real_escape_string($_GET['start_date']) : "";
if ($start_date)
$start_date_query=$start_date;
else {
$start_date_query=date
("Y-m-d",mktime(0,0,0,date("m"),date("d")-90,date("Y")));;
$end_date = (isset($_GET['end_date'])) ?
mysql_real_escape_string($_GET['end_date']) : "";
if ($end_date)
$end_date_query=$end_date;
else {
$end_date_query=date
("Y-m-d",mktime(0,0,0,date("m"),date("d"),date("Y")));;
$query_dati = "SELECT {$quotationquery}, date FROM mytable
WHERE date
BETWEEN {$start_date_query} AND {$end_date_query} ORDER BY
date
DESC";
$dati = mysql_query($query_dati, $mmm_conn) or
die(mysql_error());
$row_dati = mysql_fetch_assoc($dati);
$totalRows_dati = mysql_num_rows($dati);
?>
===============================
the command
<? echo $query_dati; ?>
will return:
SELECT quotation, date FROM mytable WHERE date BETWEEN
2007-09-19 AND
2007-12-18 ORDER BY date DESC
Even in PhpMyAdmin I don't get anything.
Heeelllppppp!!
Any suggestion will be very appreciated.
Ciao ;).
tony

sweetman wrote:
> here is the correct query string:
>
> $query_dati = "SELECT {$quotationquery}, date FROM
mytable WHERE date
> BETWEEN '{$start_date_query}' AND '{$end_date_query}'
ORDER BY date
> DESC";
You don't need those complex PHP calculations to find the
start and end
dates. It's much more efficient to do it in your SQL like
this:
$query_dati = "SELECT {$quotationquery}, date FROM mytable
WHERE date
BETWEEN DATE_SUB(NOW(), INTERVAL 3 MONTH) AND NOW() ORDER BY
date
DESC";
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Get multiple selection data of Table into an internal table

    Hi Guys,
    I have a Table in my view layout and selected 'SelectionMode' as 'Multi' in the table properties.How to get the selected data into an internal table when rows selected on the table output.For example,I have a 10 rows in the table and selected only 5 rows,need to get these 5 rows into an internal table?
    Regards
    Nandana

    Hi,
    Here is some sample code. Please try this and let me know if you are still getting any errors.
    DATA lo_nd_table_node TYPE REF TO if_wd_context_node.
      DATA lo_el_table_node TYPE REF TO if_wd_context_element.
      DATA ls_table_node TYPE wd_this->element_table_node.
      DATA lt_table_node TYPE wd_this->elements_table_node.
      DATA lt_table TYPE wdr_context_element_set.
      lo_nd_table_node = wd_context->get_child_node( name = wd_this->wdctx_table_node ).
      lt_table = lo_nd_table_node->get_selected_elements( including_lead_selection = abap_true ).
      LOOP AT lt_table INTO lo_el_table_node.
        lo_el_table_node->get_static_attributes(
          IMPORTING
            static_attributes = ls_table_node ).
        APPEND ls_table_node TO lt_table_node.
        CLEAR ls_table_node.
      ENDLOOP.
    lt_table_node contains the selected rows.

  • Selecting data from a RDBMS table using connector framework, JDBC-Connector

    Hi Experts,
    I'm trying to select data from a mysql database that is connected via the BI-JDBC System in the portal (EP 7 SP 11).
    The connection (using the Connector Gateway Service) is set up, but selecting data fails.
    Can you please give me a code example how to select data from a table using INativeQuery or IOperation / IExcecution ?? IQuery is depracted...
    Here my piece of code, actually method "connection.newNativeQuery()" throws exception "BICapabilityNotSupportedException: Operation is not supported":
         IConnection connection = null;
         public void connectToJDBCSystem(String jdbcSystem) {
           // open a connection
           try { // get the Connector Gateway Service
              Object connectorservice =
              PortalRuntime.getRuntimeResources().getService(IConnectorGatewayService.KEY);
              IConnectorGatewayService cgService =
              (IConnectorGatewayService) connectorservice;
              if (cgService == null) {
                   response.write("Error in get Connector Gateway Service <br>");
              try {
                ConnectionProperties prop =
                   new ConnectionProperties(request.getLocale(), request.getUser());
                connection = cgService.getConnection(jdbcSystem, prop);     
              } catch (Exception e) {
                   response.write("Connection to JDBC system " + jdbcSystem + " failed <br>");
                   response.write((String)e.getMessage() + "<br>");
                   e.printStackTrace();
              if (connection == null) {
                   response.write("No connection to JDBC system " + jdbcSystem + "<br>");
              } else {
                   response.write("Connection to JDBC system " + jdbcSystem + " successful <br>");
           } catch (Exception e) {
                response.write("Exception occurred <br>");
                           // up to this point it works fine...
           // build query using an IExecution object obtained from the Connection object
           response.write("prepare query 'SELECT idArt, art FROM art' <br>");
           String qstr = "SELECT idArt, art FROM art";
           INativeQuery query = null;
           try {
              query = connection.newNativeQuery();             
              response.write("execute query...<br>");
              ResultSet rs = (ResultSet)query.execute(qstr);
              while (rs.next()) {
                   response.write("<th>" + rs.getString(1) + "</th>");     
           } catch(Exception e)
              response.write("connection.newNativeQuery() failed <br>");
              response.write((String)e.getMessage() + "<br>");
              e.printStackTrace();
           } finally {
                 if( connection != null )
                 try {connection.close();}
                              catch(Exception ee){}
    Many thanks in advance, Monika
    Edited by: Monika Verwohlt on Jan 26, 2010 9:49 AM

    However this doesn't affect the XML encoding in data retrieved from XMLType using PL/SQL or programs (but it does work OK for SQLPlus SELECT).When performing an explicit serialization, with getClobVal method or XMLSerialize function, the database character set is used :
    NLS_LANG = FRENCH_FRANCE.WE8MSWIN1252
    NLS_CHARACTERSET = AL32UTF8
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> create table test_nls of xmltype;
    Table créée.
    SQL> insert into test_nls values(xmltype('<?xml version="1.0" encoding="UTF-8"?><root/>'));
    1 ligne créée.
    SQL> select * from test_nls;
    SYS_NC_ROWINFO$
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <root/>
    SQL> select t.object_value.getclobval() from test_nls t;
    T.OBJECT_VALUE.GETCLOBVAL()
    <?xml version="1.0" encoding="UTF-8"?><root/>
    SQL> select xmlserialize(document object_value as clob) from test_nls;
    XMLSERIALIZE(DOCUMENTOBJECT_VALUEASCLOB)
    <?xml version="1.0" encoding="UTF-8"?><root/>

  • Select data into deep internal table

    Dear Experts.
    I created a dynamiv deep internal table.
    while selecting data , into the internal table it is giving a dump. saying that deep structure.
    SELECT OBJTY OBJID ARBPL WERKS from crhd
    INTO CORRESPONDING FIELDS OF TABLE <f_tab>
    where WERKS = pr_werks.
    I used the field catalog also.even same error is comming.
    how to get data into deep internal table by select statement.
    Please help me,
    Regards,
    Rahul

    HI,
    Try creating dynamic internal table like:
    Field-symbols: <dyn_table> type standard table,
                                 <dyn_wa>   ,
                                 <dyn_field>.
      Data: dy_table      type ref to data,
                ifc                  type lvc_t_fcat ,
                xfc                 type lvc_s_fcat ,
               Count             type i          ,
               Count1           type i          ,
               Index              type i          ,
               dy_line           type ref to data.
             Data counter   type i.
      Data: line   type string       ,
                List    like table of line.
      Data: idetails           type abap_compdescr_tab,
                   xdetails           type abap_compdescr    .
      Data: ref_table_des type ref to cl_abap_structdescr.
    *Looping at field cat internal table to populate another field cat to be passed
    * In method used below for creating final dynamic internal table
      Loop at fieldcat into fieldcat1.
        Clear xfc.
           Xfc-fieldname            = fieldcat1-fieldname.
           Xfc-datatype              = fieldcat1-datatype.
           Xfc-intlen                    = fieldcat1-intlen.
         Append xfc            to ifc.
      endloop.
    Clear fieldcat1.
    *Method called to create dynamic internal table on the basis of field catalog created above
      Call method cl_alv_table_create=>create_dynamic_table
        Exporting
          it_fieldcatalog = ifc                     u201Cfield catalog appended above
        Importing
          ep_table        = dy_table.            u201CDynamic internal table which will be created
      Assign dy_table->* to <dyn_table>.
    *Create dynamic work area and assign to FS
      Create data dy_line like line of <dyn_table>.
      Assign dy_line->* to <dyn_wa>.
    Then use this dynamic internal table created from above method
    in the Select Query.
    Hope it helps
    Regards
    Mansi

  • How to insert data into the mysql table by giving as a text file

    Hi,
    Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
    Thanks:)

    At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).

  • How to select data from an internal table

    material                          norm                    date last modified
    B2-SP HEAT                 50.000               20090420
    BF COKE                                 575.000               20090419
    GROSS COKE                 200.000               20090419
    B2-SP HEAT                 100.000               20090419
    TWT                                 33.000               20090330
    B7-SP HEAT                 2.000               20090310
    B1-SP HEAT                 1.000               20090309
    B7-SP HEAT                 615.000               20090308
    B2-SP HEAT                 585.000               20090308
    B1-SP HEAT                 100.000               20090308
    B3-SP HEAT                 610.000               20090308
    BF COKE                                 68.500               20090308
    GROSS COKE                 72.600               20090308
    B8-SP HEAT                 600.000               20090308
    B9-SP HEAT                 625.000               20090308
    BX-SP HEAT                 615.000               20090308
    B9-SP HEAT                 58.000               20090307
    B1-SP HEAT                 100.000               20090307
    B6-SP HEAT                 350.000               20090306
    B2-SP HEAT                 888.000               20090306
    Like above there r numerous data in a table :
    how will i select data into another internal table where material above is not repeated with latest modified date.please help.

    Hi Sonu,
    The main task is to move the contents of the one internal table to another with some condition.
    First sort and delete the duplicate entries from the First Internal table like below : 
    sort it_tab by material ascending date_modified descending.
    delete adjacent duplicates from it_tab.
    Then move that Internal table contents to another internal table.
    Define another internal table with the same structure as you have first internal table and then
    Second Step :
    it_itab1 = it_itab.
    If you are using seperate Header line and Body then you can do like below :
           it_itab1[] = it_itab[].
    This will fix the issue.
    Please let me know if you need any further explonation.
    Regards,
    Kittu
    Edited by: Kittu on Apr 24, 2009 12:21 PM

  • Select Data from 2 intern tables

    Hi Experts,
    how I can select Data from 2 intern Tables into another intern table?
    For Example:
    My Result  Table has the fields: mandt, user, ID, ID_Name.
    My select table no. 1 has the fields mandt, XYZ (like A_Name), ID, ID_Name, ...
    My select table no. 2 has the fields mandt, A_Name, User, ...
    I want to search for all entries in select table no. 1 and 2. where are a_name have the same worth.
    How I can select my Dates?
    Regards,
    Mike

    hii
    you can do it by using for all entries and with READ statement ..do like follow code
    IF i_marc[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               lgort                       " Storage Location
          FROM mard
          INTO TABLE i_mard
           FOR ALL ENTRIES IN i_marc
         WHERE matnr EQ i_marc-matnr
           AND werks EQ i_marc-werks
           AND lgort IN s_lgort.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
      IF sy-subrc EQ 0.
        LOOP AT i_output INTO wa_output.
          READ TABLE i_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
          wa_output-lgort = wa_mard-lgort.
          MODIFY i_output FROM wa_output.
          CLEAR wa_output.
        ENDLOOP.                           " LOOP AT i_output
      ENDIF.                               " IF sy-subrc EQ 0
    regards
    twinkal

  • Select data from all the table names in the view

    Hi,
    "I have some tables with names T_SRI_MMYYYY in my database.
    I created a view ,Say "Summary_View" for all the table names
    with "T_SRI_%".
    Now i want to select data from all the tables in the view
    Summary_View.
    How can i do that ? Please throw some light on the same?
    Thanks and Regards
    Srinivas Chebolu

    Srinivas,
    There are a couple of things that I am unsure of here.
    Firstly, does your view definition say something like ...
    Select ...
    From "T_SRI_%"
    If so, it is not valid. Oracle won't allow this.
    The second thing is that your naming convention for the
    tables suggests to me that each table is the same except
    that they store data for different time periods. This would be
    a very bad design methodology. You should have a single
    table with an extra column to state what period is referred to,
    although you can partition it into segments for each period if
    appropriate.
    Apologies if i am misinterpreting your question, but perhaps
    you could post your view definition and table definitions
    here.

  • Getting just the date out of MySQL with CF8

    I have a mysql table that includes a column 'intakeDate' set to the data type of DATE. When entering, it creates a record of YYYY-MM-DD. When I query the database with Coldfusion for the date of 2004-06-10, I get the result of {ts '2004-06-10 00:00:00'}. Fine and dandy for people in my timezone, but I found that if my users are in any timezone west of Eastern, the date slips back to the day before and their 'time stamp' is 23:00:00 (or appropriate offset). How can I get Coldfusion to just return to my Flex application only the value inside the table and not its ts version with midnight attached. Again, the table is set to only DATE and not TIMESTAMP or DATETIME so there are no time values entered. Also, mind you that this is being sent to a Flex application's manage class. Since some of this information deals with shot records and medical records, date is very important.
    I tried the MySQL function of DATE but it doesn't change the output.
    <cfquery name="list" datasource="#request.dsn#">
        Select DATE(intakeDate) as intakeDate FROM pets
    </cfquery>
    RESULTS IN:
    {ts '2010-12-29 00:00:00'}   {ts '2010-11-18 00:00:00'}    {ts '2009-12-28 00:00:00'}   {ts '2009-10-03 00:00:00'}   {ts '2009-07-13 00:00:00'}   {ts '2009-10-03 00:00:00'}    {ts '2008-06-01 00:00:00'}   {ts '2008-02-09 00:00:00'}   {ts '2003-03-01 00:00:00'}
    {ts '2004-06-10 00:00:00'}   {ts '2003-03-01 00:00:00'}    {ts '2004-06-01 00:00:00'}   {ts '2001-06-01 00:00:00'}   {ts '2010-04-01 00:00:00'}   {ts '2011-04-06 00:00:00'}    {ts '2011-04-06 00:00:00'}    {ts '2004-11-01 00:00:00'}    {ts '2010-05-04 00:00:00'}, etc
    I've been googling it all day and nothing I see if working.
    Thank!

    Thanks for pointing that out. I was playing DATE_FORMAT to convert to a string
    DATE_FORMAT(p.intakeDate, '%Y-%m-%d') as intakeDate

  • Can't get JDeveloper/OC4J to auto-create MySQL table

    My EJB 3.0 based application is failing to create the MySQL table specified by the @TableGenerator annotation.
    Following are the details of my setup and application:
    System Setup:
    - JDeveloper 10.1.3.1.0
    - JDK 1.5.0_07
    - Ubuntu Linux kernel 2.6.15-27-k7
    - MySQL 5.0
    - MySQL ConnectorJ 3.1.13
    - Using the embedded OC4J server.
    I have done the following so far:
    1. Created a database in MySQL called, "test". Did not create any tables.
    2. Created a JDeveloper library whose classpath contains the MySQL ConnectorJ JAR file, and tested a database connection from JDeveloper successfully.
    3. Added the MySQL/JDeveloper library to my ejb project, "Test1/Model", and selected the database connection from the project properties EJB panel. The database connector is called, "SmashDB". Selecting the database connector on the EJB panel resulted in JDeveloper setting "SmashDBDS" as the default datasource.
    A JSF managed bean calls an EJB Session Bean, CustomerFacadeBean.persistEntity(Customer customer) with a Customer object as a parameter to save in the database. OC4J successfully connects to the MySQL "test" database, but fails when trying to access the ID_GENERATOR table, which is specified in an @TableGenerator annotation. The class-level annotations in the Customer entity are as follows:
    @Entity
    @NamedQuery(name = "Customer.findAll", query = "select o from Customer o")
    @TableGenerator(name = "BasicIDGen", table = "ID_GENERATOR", pkColumnName = "GEN_KEY",
    pkColumnValue = "CUSTOMER_ID", valueColumnName = "GEN_VALUE")
    public class Customer implements Serializable {
    private Long id;
    private Integer version;
    private String firstName;
    private String lastName;
    private String emailAddr;
    My persistence.xml file contains:
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="Model">
    <properties>
    <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
    </properties>
    </persistence-unit>
    </persistence>
    With the above definition for Customer and persistence.xml, I expected the ID_GENERATOR and CUSTOMER tables to be created automatically, but this doesn't seem to be happening.
    Instead, I get the following error message and stack trace:
    2006-09-27 12:25:29.564 ERROR J2EE EJB-08006 [CustomerFacade:public java.lang.Object facade.CustomerFacadeBean.persistEntity(java.lang.Object)] exception occurred during method invocation: oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Table 'test.ID_GENERATOR' doesn't existError Code: 1146
    Call:UPDATE ID_GENERATOR SET GEN_VALUE = GEN_VALUE + ? WHERE GEN_KEY = ?
         bind => [50, CUSTOMER_ID]
    Query:DataModifyQuery(); nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Table 'test.ID_GENERATOR' doesn't existError Code: 1146
    Call:UPDATE ID_GENERATOR SET GEN_VALUE = GEN_VALUE + ? WHERE GEN_KEY = ?
         bind => [50, CUSTOMER_ID]
    etc.....
    Help would be greatly appreciated. I've gotten to this point, which appears to be one error away from success (I hope) but don't have a clue what this problem is caused by.
    Thanks,
    Rick Horowitz

    darby wrote:
    I can't get this to compile. help!
    You can not issue DDL in PL/SQL. You need to use dynamic SQL for that:
    create or replace
    PROCEDURE CREATE_STAGING_TABLES as
    BEGIN
      -- I CAN'T GET THIS TO WORK BUT I CAN COPY THESE LINES AND RUN THEM AND THEY WORK! WHATUP?
      DBMS_OUTPUT.PUT_LINE('Begin Create Import Tables');
      EXECUTE IMMEDIATE 'Create table FAC_STAGING_PROJECTS As select * from FAC_PROJECTS where 1=2';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PROJECTS add(ERROR_DESCRIPTION VARCHAR2(4000 CHAR))';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PROJECTS add(bImported NUMBER)';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PROJECTS add(dteImported DATE)';
      EXECUTE IMMEDIATE 'Create table FAC_STAGING_PURCHASE_ORDERS As select * from FAC_PURCHASE_ORDERS where 1=2';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PURCHASE_ORDERS add(ERROR_DESCRIPTION VARCHAR2(4000 CHAR))';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PURCHASE_ORDERS add(bImported NUMBER)';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PURCHASE_ORDERS add(dteImported DATE)';
      DBMS_OUTPUT.PUT_LINE('End Create Import Tables'); 
      EXCEPTION
       WHEN OTHERS THEN
         raise_application_error(-20022,substr(SQLERRM,1,255));
    END CREATE_STAGING_TABLES;SY.
    P.S. I am not questioning why do you need to create tables from a stored procedure.

  • Selecting data from two different tables.

    Do we need to use join two tables with primary/foreign key while trying to use select statement for getting data from those to table.? If no who can i go about do it.

    872959 wrote:
    If i am using From clause to get data from two different tables, is it necessary that both tables have column of identical data in them.In general, they ought to (or you need to join in a third table that tells you how to map rows from one table to rows of the other table).
    It is not strictly necessary that there be any join condition between tables. If you don't provide a join condition, Oracle has to do a Cartesian product. That means that if there are n rows in one table and m rows in the other, the result set will have n * m rows. It is very rarely a good idea to write queries that do Cartesian products but it does occasionally happen.
    Justin

  • How to get the selected rows & columns in the table?

    hi everybody,
                         In my application the table is kept inside the event structure.I select the cells  in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?

    Hello,
    You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings.  I think for your "disable" question you are referring to the shortcut menu (when you right click).  If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How to get all the data stored on a table?

    Hi.
    I'm tryng to get all the data stored on a database table but I'm losing in trouble. I've looked for a soloution to my problem in the forums but each post I follow related to this issue gives me a different way to solve the problem and no one works :(
    I suppose I have to call the getAllRowsInRange() method from my ViewObject class. But how can I get an instance of my ApplicationModule in order to get the corresponding ViewObject?
    I think I messed my head a lot.
    Could someone help me please?
    Thanks in advance.

    Thanks for your answer.
    However, there are some things that I don't understand. I will look the book but why is necessary to create another ApplicationModule? The fact is that my application just have one ApplicationModule.
    Apart from that, I have tried your suggestion and I've obtained the quite little friendly response that follows:
    javax.faces.FacesException: #{backing_pruebaFilas.commandButton1_action}: javax.faces.el.EvaluationException: oracle.jbo.ConfigException: JBO-33001: No se ha encontrado el archivo de configuración /DatosViewObj/common/bc4j.xcfg en classpath
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: oracle.jbo.ConfigException: JBO-33001: No se ha encontrado el archivo de configuración /DatosViewObj/common/bc4j.xcfg en classpath
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 24 more
    Caused by: oracle.jbo.ConfigException: JBO-33001: No se ha encontrado el archivo de configuración /DatosViewObj/common/bc4j.xcfg en classpath
         at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:367)
         at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:284)
         at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:539)
         at oracle.jbo.common.ampool.ContextPoolManager.findPool(ContextPoolManager.java:165)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1498)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)
         at view.backing.PruebaFilas.commandButton1_action(PruebaFilas.java:100)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 25 more
    At that point, I think a better explanation of my purpose could be helpful. What I'm trying to do is just create a simple page with a command button, and in its action method get all the data stored in the rows of the table. I've seen a possible solution that I understand:
    DCIteratorBinding iter = getIterator("DatosViewObj1Iterator");
    System.out.println("Iterator Binding: "+iter);
    int startRange = iter.getRangeSize();
    iter.setRangeSize(-1);
    Row[] rows = iter.getAllRowsInRange();
    iter.setRangeSize(startRange);
    but the problem is that I don't know what is the class the method getIterator belongs to.
    Could you help me with this last piece of code? If not, I accept, of course, any suggestion. I am absolutely stuck.
    Thanks and regards.

  • How to get the default data in emp,dept tables

    Hi all
    i inserted some date into emp,dept tables.
    after that i want to default records what is containing at the
    time of instaling in oracle.
    what script can i run to get that data.
    Regards
    GB rao

    The script $ORACLE_HOME/sqlplus/demo/demobld.sql creates and
    populates all the demonstration tables. You can extract the
    actual INSERT statements from there.

  • How to select data from one nested table and into another nested table

    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    Thanks,
    in advance

    >
    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    >
    Not unless you provide the code you are actually using.
    There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
    And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
    Post the actual code you are using and all of the structures being used.
    Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing.

Maybe you are looking for