Solving a problem in a query

Hi friends
I am resolving some troubles in application. This SQL Statemet works fine in Oracle9i but Now it does not work in Oracle8i. Up to 2 days ago this was function well.
insert into parecidos (par_score, par_cli_id, par_cli_fve_id, par_cli_cep_id, par_id, par_cli_razon_social, par_cli_nombre, par_cli_rif, par_cli_ci, par_cli_geoname, par_campo ) select * from ( select score(1)  SCORE, cli_id, cli_fve_mantenimiento, cli_cep_id, 9921 par_id,  cli_razon_social, cli_nombre, cli_rif, cli_ci, cli_geoname, 1  from   clientes  where  (contains ( cli_nombre, 'ABASTOS%' ,1) > 0 )  and cli_geoname in ( select geoname from lista_geonames ) order by score desc )
ERROR at line 1:
ORA-29909: label for the ancillary operator is not a literal number
PROD>I checked the tables involved in the sentences and they have the same structure. Somebody here know how can I resolve this ?
The problem is caused by this ( score(1) SCORE )
Joel Pérez

I found it:
Click here for details of sections in this note.
Bug 984251 CURSOR_SHARING=FORCE can cause ORA-29909 when using an ANCILLARY OPERATOR
This note gives a brief overview of bug 984251.
Affects:
Product (Component) Oracle Server (RDBMS)
Range of versions believed to be affected Versions >= 8.1.6 but < 9.0
Versions confirmed as being affected 8.1.7.1
Platforms affected Generic (all / most platforms affected)
Fixed:
This issue is fixed in 8.1.7.2 (Server Patch Set)
9.0.1.0 (Base Release)
Symptoms:
Error may occur
ORA-29909
Related To:
Literal Replacement (CURSOR_SHARING)
Description
CURSOR_SHARING=FORCE can cause ORA-29909 when using an ANCILLARY OPERATOR.
The full bug text (if published) can be seen at <Bug:984251>
This link will not work for UNPUBLISHED bugs.
Joel Pérez

Similar Messages

  • Problem in SAP Query with currency conversion   based on table TCURX

    Hi All,
    I have an infoset where tables A903 and KONP are joined . Query is displaying the KONP-KBTER values with currency as stored in the database table .My requirement is to show the KBETR value as per decimals stored in TCURX table for that currency .
    For Example If KONP-KBETR = 51.29 JPY , It sholuld display as 5129  as  Decimal places for JPY is 0.
    There is FM CURRENCY_AMOUNT_SAP_TO_DISPLAY Which gives the equvivalent display value to the databse value value.But it is giving dump because of type conflict with
    KONP-KBETR .
      Can any body help me how can i solve the problem in My Query ? .Pls any small idea taht may help greatly  also warmly welcome .
    Thx,
    Dharma .

    Hi Sriram ,
    But how can i use it in Queries . I mean should I go for a additional filed in infoset and then passing the  converted value to the the that additional field .
    Thx ,
    Dharma .

  • After updating to Firefox 7.0.1, menu bar for Google,yahoo, Facebook (message,notification,profile,home) and others site are disabled. How can solve this problem?

    after updating to Firefox 7.0.1, menu bar for Google(web ,image,video,map etc),yahoo, Facebook (message,notification,profile,home) and others site are disabled. even I cant log out from different sites cz the log out bar is completely disabled. I tried with Firefox 4;5 and 6, same problem exist . I tried by active all add ons for facebook, same problem exist. If I use internet explorer , I don't find such problem with it.
    How can I solve this problem?

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • Weird problem with mysql query and data table buttons !!!!

    Hi,
    I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
    Source query for the table is :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    AND tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    The tbl_tesserati.data_nascita is a mysql date field.
    The click event handler code for the "Details" Button is:
    public String btnModificaTesserato_action() {
            try{
                TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
                getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));          
            } catch(Exception ex) {
                log("errore nella query",ex);
            return "dettaglioTesseratoSocieta";
        }When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
    If i set a breakpoint in the code line   TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
    I tried to modify the source query to :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    OR tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    Using this query everything works well !! The click handler works and the debugger too !!
    I changed only the AND in OR !!!
    I also tried to change mysql-x-x-connector driver but without solving my problem.
    Can someone help me ?
    Thanks
    Giorgio

    You'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
    AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
    The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
    Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
    AND to_days(tbl_tesserati.data_nascita >= ? )
    AND to_days( tbl_tesserati.data_nascita<= ? )
    Or try the BETWEEN version with to_days() and see what you get.
    More info about date formatting (v5) here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
    Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
    As a matter of interest, did you try your query in a different piece of software?
    If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
    Message was edited by:
    aerostra

  • Problem with a query in Forms6i

    Hello,
    hope someone can help me with this issue. I have a query like this:
    select c_id ,dat_tim,glo,utr
    from ce_pro
    where c_id IN ('X1200', 'X1210')
    and glo not like 'null' or utr not like 'null'
    group by c_id, dat_tim,glo, utr
    having dat_tim between '11-JAN-2001'
    and '29-JAN-2001'
    order dat_tim desc,c_id asc;
    If X1200 and X1210 have glo or utr like null, then this query give me other c_id(for example X909 and X880) values different from X1200 and
    X1210 because they have glo not like null or utr not like null.
    What I like to get is this:If X1200 and X1210 have glo and utr values like null, then my query shall only return X1200 and X1210 with glo and utr like null. It seems like the condition glo not like 'null' or utr not like 'null' decide the outcome of my query and not the condition c_id IN ('X1200', 'X1210'). Hope someone can help.
    Best Regards
    Roar

    Hello,
    thanks a lot for valuable suggestions related to my problem. Setting (glo IS NOT NULL OR utr IS NOT NULL) solved my problem.
    So again, thanks a lot.
    Regards
    Roar

  • Problem in update Query of  MySQL

    Hi
    I have a large amounts of records in a teble & i want to update the records in a particular condition but it takes time in updating.
    I have also used batch update but it's also not going to solve my problem.
    can anyone help what should i do to frequently update in a large amount of data.
    I am using MySQL along with core java.

    It's not a Java question but more of a database profiling question. Try to post your description of the problem and the query in a MySQL forum.
    Kaj

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Problem Opening a query in query designer

    Hi Friends,
    I am trying to open an existing query in the Query designer, but im getting a message " Bex Transport request is not available or not suitable". I have assigned a package transport request to the package, even after that im still getting this message.
    Can anyone please let me know where am i going wrong?
    Your help is verymuch appreciated.
    Regards
    BN

    Hi,
    The transport request of the query was moved to QA.Basically,
    BEx query should be in transport request.Then only you can edit it.
    So collect the query in transport request. It will solve your problem.
    Regards,
    Saran

  • One more Problem with SAP query

    Hi All,
    I am having a problem with SAP query
    Execution of SAP query transaction is leading to Dump
    the dump says Field 'R01' contains no fields, syntax check on the program shows same error.
    When I tried regenerating the Query in SQ01
    " Query Specification cannot be use to generate list
    Ranked list contains only numeric fields
    Please help me

    Gianpiero Bucchieri wrote:
    > So its important to listening the following tables too: Faktura (invoice), Partner Role, Partnernumber and the requierements number. The table are EKKO EKPO AND VRKPA OR vbkd, but if I join this table the query doesn't listining any results. If I cancel this 3 or 4 table and I start the query, the listening are ok. 
    >
    I am not sure what business process you are describing here - is it some kind of third-party sales order? If so, your join is wrong.
    From VB E P, firled BANFN and BNFPO you can go to table EBAN, where in field EBELN you will find the number of the purchase order (if somebody already had an MRP+Me58 run over the PR) which will lead you to table EKKO, and EKPO.
    So what we have here (essentially is):
    VBAK -> VBAP -> VBEP -> EBAN -> EKKO -> EKPO
    But that only solves one of your problems - you still have a long way to go to get invoices, partner and partner roles into there and I am beginning to ask myself what exactly it is you want to evaluate.
    Care to explain?
    Edited by: Mylène Dorias on Apr 1, 2010 2:10 PM

  • Re: Transport problem of SAP Query in Global Area

    Hi All,
    I am facing a problem in transporting the query which is created in Global area.
    I created a Query in Global Area and saved in a Transport Request. Now i created a Transaction code for this query by taking the Program name generated by this Query.
    then i released the TR to Quality sys, which contains User Group, Infoset, Query & Transaction code. I see User Group & Infoset in my Quality sys but i dont see th Query & Transaction code assigned to this Query, and when i try to run the transaction code assigned to this query its giving dump saying 'LOAD_PROGRAM_NOT_FOUND'.
    Could anyone please help me in resolving this..am i missing any steps here...kindly do the needful...
    Regards,
    Pavan

    Hi i solved my problem by myself.
    I have to set Query as external available and have to use the MDX Query.
    Its strange because if i build a new report the query dont have to be set as external available.

  • Problem Change SAP Query in Crystal Reports

    Hi,
    i have a problem with changing a SAP Query in an Crystal Reports.
    I build a Report with a Query(1) and Design the Report complet everything works fine.
    I make a new Query(2) and if i make a new Crystal Report with this new Query everything works fine.
    Now my problem is i would like to use the design of the first report. Therefore i open the first report and save it under a new name. Delete all Database fields and delete the database connection.
    Now i gave in the new database connection to the new query(2) and in the Database fields i see a lot of Fields but not the right ones. Its completly wrong. Is there anybody how know this problem?????

    Hi i solved my problem by myself.
    I have to set Query as external available and have to use the MDX Query.
    Its strange because if i build a new report the query dont have to be set as external available.

  • URGENT!Problem running a Query with a Subquery that includes the same table

    Hello all,
    Currently we are working over Oracle Database 10g Release 2 (10.2.0.3) Patch Set1.
    We have registered a schema called ICRI and we have created two VIEW over this schema to work in some occasions.
    CREATE OR REPLACE VIEW "ICRI_RELACIONAL_VIEW"
    (IDICRI, NOMBRERECURSO, VERSIONRECURSO) AS
    SELECT extractValue(value(i), '/ICRI/ID/text()'),
           extractValue(value(i), '/ICRI/NombreRecurso/text()'),
           extractValue(value(i), '/ICRI/VersionRecurso/text()') || '.' || extractValue(value(m), '/Modificacion/Secuencia/text()'),
    FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Modificaciones/Modificacion'))) m
    WHERE extractValue(value(m), '/Modificacion/Secuencia/text()') =
          (SELECT max(extractValue(value(s), '/Secuencia/text()'))
           FROM table(xmlsequence(extract(value(i),'/ICRI/Modificaciones/Modificacion/Secuencia'))) s)
    WITH READ ONLY;
    CREATE OR REPLACE VIEW "ICRI_DOMINIOS_VIEW"
    (ID, DOMINIO) AS
    SELECT extractValue(value(i), '/ICRI/ID/text()'),
           extractValue(value(a), '/Dominio/text()', 'xmlns="http://www.orswegimoarmada.es/ORSWE/ICRI"')
    FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Dominios/Dominio'))) a
    WITH READ ONLY;We have created 5000 XML documents based in this schema and stored in the database.
    Now we have executed different querys to obtain certain data.
    * QUERY 1
    SELECT COUNT(*) FROM ICRI_DOMINIOS_VIEW V1, ICRI_DOMINIOS_VIEW V2
    WHERE V1.ID = V2.ID AND V1.DOMINIO = 'Mar' AND V2.DOMINIO = 'Tierra'Time: 38sg. 1 row, Value: 1097.
    * QUERY 2
    SELECT COUNT(*) FROM ICRI_DOMINIOS_VIEW V1
    WHERE V1.DOMINIO = 'Mar'
          AND
          V1.ID IN (SELECT V2.ID FROM ICRI_DOMINIOS_VIEW V2
                    WHERE V2.DOMINIO = 'Tierra')Time: 34sg. 1 row, Value: 1097.
    * QUERY 3 (XPath Version)
    SELECT COUNT(*)
    FROM ICRI
    WHERE existsNode(object_value, '/ICRI/Dominios[Dominio="Mar" and Dominio="Tierra"]')=1
    Time: 32msg. 1 row, Value: 1097.
    * QUERY 4 (Version XPath)
    SELECT extractValue(object_value, '/ICRI/ID/text()')
    FROM ICRI
    WHERE existsNode(object_value, '/ICRI/Dominios[Dominio="Mar" and Dominio="Tierra"]')=1
    Time: 63mseg. 1097 rows.
    * QUERY 5
    SELECT V1.ID FROM ICRI_DOMINIOS_VIEW V1, ICRI_DOMINIOS_VIEW V2
    WHERE V1.ID = V2.ID AND V1.DOMINIO = 'Mar' AND V2.DOMINIO = 'Tierra'
    Time: 15sg. 1097 rows.
    * QUERY 6
    SELECT V1.ID FROM ICRI_DOMINIOS_VIEW V1
    WHERE V1.DOMINIO = 'Mar'
    AND
    V1.ID IN (SELECT V2.ID FROM ICRI_DOMINIOS_VIEW V2
    WHERE V2.DOMINIO = 'Tierra')
    Time: 26sg. 1097 rows.
    Now, with the next query, we have found an important issue in Oracle, because this query doesn't return any row.
    * QUERY 7
    SELECT extractValue(value(i), '/ICRI/ID/text()') ID,
           extractValue(value(i), '/ICRI/NombreRecurso/text()') NOMBRE,
           extractValue(value(i), '/ICRI/VersionRecurso/text()') || '.' || extractValue(value(m), '/Modificacion/Secuencia/text()') VERSION
    FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Modificaciones/Modificacion'))) m
    WHERE
       (extractValue(value(m), '/Modificacion/Secuencia/text()') =
        (SELECT max(extractValue(value(s), '/Secuencia/text()'))
         FROM table(xmlsequence(extract(value(i),'/ICRI/Modificaciones/Modificacion/Secuencia'))) s)
    AND
       (extractValue(value(i), '/ICRI/ID/text()') IN
        (select extractValue(object_value, '/ICRI/ID/text()') ID
         FROM ICRI
         WHERE (existsNode(object_value, '/ICRI/Dominios[Dominio="Mar" and Dominio="Tierra"]')=1)
    )Time 607mseg. 0 rows.
    * QUERY 8
    SELECT VI.IDICRI, VI.NOMBRERECURSO, VI.VERSIONRECURSO
    FROM ICRI_RELACIONAL_VIEW VI, (SELECT V1.ID FROM ICRI_DOMINIOS_VIEW V1, ICRI_DOMINIOS_VIEW V2
                                   WHERE V1.ID = V2.ID AND V1.DOMINIO = 'Mar' AND V2.DOMINIO = 'Tierra') V3
    WHERE VI.IDICRI = V3.ID Time: 16sg. 1097 rows.
    * QUERY 9
    SELECT VI.IDICRI, VI.NOMBRERECURSO, VI.VERSIONRECURSO
    FROM ICRI_RELACIONAL_VIEW VI
    WHERE VI.IDICRI IN
    (SELECT V1.ID FROM ICRI_DOMINIOS_VIEW V1
    WHERE V1.DOMINIO = 'Mar'
          AND
          V1.ID IN (SELECT V2.ID FROM ICRI_DOMINIOS_VIEW V2
                    WHERE V2.DOMINIO = 'Tierra')Time: 34 sg. 1097 rows.
    * QUERY 10
    SELECT extractValue(value(i), '/ICRI/ID/text()') ID,
    extractValue(value(i), '/ICRI/NombreRecurso/text()') NOMBRE,
    extractValue(value(i), '/ICRI/VersionRecurso/text()') || '.' || extractValue(value(m), '/Modificacion/Secuencia/text()') VERSION
    FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Modificaciones/Modificacion'))) m,
    (SELECT V1.ID FROM ICRI_DOMINIOS_VIEW V1, ICRI_DOMINIOS_VIEW V2
    WHERE V1.ID = V2.ID AND V1.DOMINIO = 'Mar' AND V2.DOMINIO = 'Tierra') V3
    WHERE
    (extractValue(value(m), '/Modificacion/Secuencia/text()') =
    (SELECT max(extractValue(value(s), '/Secuencia/text()'))
    FROM table(xmlsequence(extract(value(i),'/ICRI/Modificaciones/Modificacion/Secuencia'))) s)
    AND
    extractValue(value(i), '/ICRI/ID/text()') = V3.ID
    Time: 15sg. 1097 rows.
    * QUERY 11
    SELECT extractValue(value(i), '/ICRI/ID/text()') ID,
           extractValue(value(i), '/ICRI/NombreRecurso/text()') NOMBRE,
           extractValue(value(i), '/ICRI/VersionRecurso/text()') || '.' || extractValue(value(m), '/Modificacion/Secuencia/text()') VERSION
    FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Modificaciones/Modificacion'))) m
    WHERE
       (extractValue(value(m), '/Modificacion/Secuencia/text()') =
        (SELECT max(extractValue(value(s), '/Secuencia/text()'))
         FROM table(xmlsequence(extract(value(i),'/ICRI/Modificaciones/Modificacion/Secuencia'))) s)
    AND
       (extractValue(value(i), '/ICRI/ID/text()') IN (SELECT V1.ID FROM ICRI_DOMINIOS_VIEW V1
                                                      WHERE V1.DOMINIO = 'Mar'
                                                      AND
                                                      V1.ID IN (SELECT V2.ID FROM ICRI_DOMINIOS_VIEW V2
                                                                WHERE V2.DOMINIO = 'Tierra'))
    )Time: 30sg. 1097 rows.
    * QUERY 12
    SELECT extractValue(value(i), '/ICRI/ID/text()') ID,
           extractValue(value(i), '/ICRI/NombreRecurso/text()') NOMBRE,
           extractValue(value(i), '/ICRI/VersionRecurso/text()') || '.' || extractValue(value(m), '/Modificacion/Secuencia/text()') VERSION
    FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Modificaciones/Modificacion'))) m
    WHERE
       (extractValue(value(m), '/Modificacion/Secuencia/text()') =
        (SELECT max(extractValue(value(s), '/Secuencia/text()'))
         FROM table(xmlsequence(extract(value(i),'/ICRI/Modificaciones/Modificacion/Secuencia'))) s)
       )Time: 187msg. 5000 rows.
    Well, if we execute the query based in a relational view all work fine but the performance of the query is hugely decreased. If we try to execute the query based in the XPath values, this options must be the correct, the query doesn't return any result.
    Any idea to solve this problem? For us it is very important to find a solution as soon as possible, because our development time is finishing.
    Our clients have installed Oracle Client 10.2.0.1 & ODAC 10.2.0.20.
    Thanks in advance for your help,
    David.

    SQL> alter session set optimizer_features_enable='10.1.0';
    Session altered.
    SQL> SELECT count(*)
    2 FROM ICRI i, table(xmlsequence(extract(value(i), '/ICRI/Modificaciones/Mo
    dificacion'))) m
    3 WHERE
    4 extractValue(value(i), '/ICRI/ID/text()') IN
    5 (select extractValue(object_value, '/ICRI/ID/text()') ID
    6 FROM ICRI
    7 WHERE (existsNode(object_value,
    8 '/ICRI/Dominios[Dominio="Mar" and Dominio="Tierra"]')=1))
    9 /
    COUNT(*)
    5
    Test this with a few of your queries and see if the results are expected.
    if so I am thinking it is close to bug 5585187
    QUERY NOT RETURNING PROPER RESULTS WITH INLINE VIEWS
    Fixed in 11.
    I am going to see if I can get an env to see if your TC works with this fix before I confirm it 100 percent.
    Also note this was done with a very scaled down version of your testcase. Using only one XML doc
    regards
    Coby
    Message was edited by: Coby
    coadams

  • Problem looping insert query

    I'm working on inserting a recordset up Google Calendar entries into my site database. I have a form set up that allows me to insert new entries into the data table, but when I try to loop the insert query over the Google recordset, I get nothing (no errors, but no entries added to database).
    Here's my form, which both displays the values from the Google query and populates fields (mostly hidden) with those values to submit to the Insert query. There's also a line that checks to make sure the event hasn't been canceled (canceled events are still listed, the start and end times are just set to null values):
    <form method="post" action="<cfoutput>#CurrentPage#</cfoutput>">
    <table cellpadding="2" border="1">
    <cfset thisRow = 0>
    <cfloop query="band_events">
    <cfif IsDefined("starttime") AND IsDefined("endtime") AND starttime NEQ "" AND endtime NEQ "">
    <cfset thisRow = thisRow + 1>
    <cfoutput>
    <tr>
      <td>#thisRow#</td>
      <td><input name="update#thisRow#" type="checkbox" checked="checked" /></td>
      <td><input name="calendar#thisRow#" type="hidden" value="Band" />Band</td>
      <td><input name="creator#thisRow#" type="hidden" value="#authoremail#" />#authoremail#</td>
      <td><input name="starttime#thisRow#" type="hidden" value="#starttime#" />#starttime#</td>
      <td><input name="endtime#thisRow#" type="hidden" value="#endtime#" />#endtime#</td>
      <td><input name="title#thisRow#" type="hidden" value="#title#" />#title#</td>
      <td><input name="content#thisRow#" type="hidden" value="#content#" />#content#</td>
      <td><input name="location#thisRow#" type="hidden" value="#where#" />#where#</td>
      <td><input name="ID#thisRow#" type="hidden" value="#ID#" />#ID#</td>
      <td><input name="published#thisRow#" type="hidden" value="#ISOToDateTime(published)#" />#ISOToDateTime(published)#</td>
      <td><input name="updated#thisRow#" type="hidden" value="#ISOToDateTime(updated)#" />#ISOToDateTime(updated)#</td>
    </tr>
    </cfoutput>
    </cfif>
    </cfloop>
    </table>
    <input type="hidden" name="totalRows" value="#row#" />
    <input type="submit" name="submit" value="Submit" />
    <input type="hidden" name="update_events" value="update_events" />
    </form>
    Here's the action script. There's some extra code in there to convert some of the date formats Google uses, and to account for the differences in time zones between the Google values and local time:
    <cfif StructKeyExists(form,"update_events")>
      <cfset loopCount = form["totalRows"]>
      <cfloop index="row" from="1" to="#loopCount#">
        <cfset thisCalendar = form["calendar" & row]>
        <cfset thisCreator = form["creator" & row]>
        <cfset thisStarttime = form["starttime" & row]>
        <cfset thisEndtime = form["endtime" & row]>
        <cfif TimeFormat(thisStarttime,"hh:mm tt") EQ "12:00 AM" AND TimeFormat(thisEndtime,"hh:mm tt") EQ "12:00 AM">
          <cfset thisAllDay = -1>
        <cfelse>
          <cfset thisAllDay = 0>
          <cfset thisStarttime = DateAdd("h",5,thisStarttime)>
          <cfset thisEndtime = DateAdd("h",5,thisEndtime)>
        </cfif>
        <cfset thisTitle = form["title" & row]>
        <cfset thisContent = form["content" & row]>
        <cfset thisLocation = form["location" & row]>
        <cfset thisID = form["ID" & row]>
        <cfset thisPublished = form["published" & row]>
        <cfset thisUpdated = form["updated" & row]>
        <cfquery datasource="ctband">
          INSERT INTO Events (Calendar, Created_By, All_Day, Event_Start, Event_End, Title, Content, Location, ID, Published, Updated) Values (
          <cfqueryparam value="#thisCalendar#" cfsqltype="cf_sql_varchar">,
          <cfqueryparam value="#thisCreator#" cfsqltype="cf_sql_varchar">,
          <cfqueryparam value="#thisAllDay#" cfsqltype="cf_sql_integer">,
          <cfqueryparam value="#thisStarttime#" cfsqltype="cf_sql_timestamp">,
          <cfqueryparam value="#thisEndtime#" cfsqltype="cf_sql_timestamp">,
          <cfqueryparam value="#thisTitle#" cfsqltype="cf_sql_varchar">,
          <cfqueryparam value="#thisContent#" cfsqltype="cf_sql_clob">,
          <cfqueryparam value="#thisLocation#" cfsqltype="cf_sql_varchar">,
          <cfqueryparam value="#thisID#" cfsqltype="cf_sql_varchar">,
          <cfqueryparam value="#thisPublished#" cfsqltype="cf_sql_timestamp">,
          <cfqueryparam value="#thisUpdated#" cfsqltype="cf_sql_timestamp">)
        </cfquery>
      </cfloop>
    </cfif>
    I'm thinking there must be something pretty obvious I've screwed up, but I can't for the life of me find it. Any help would be appreciated!
    JAW

    First, I see this:
    <cfset thisRow = thisRow + 1>
    Which is you counting the number of rows, I assume.  Then I see this:
    <input type="hidden" name="totalRows" value="#row#" />
    But I don't see where #row# has been set.
    You are correct. That was a combination of a couple different attempts at this and I used the wrong variable name on that line. Alas, correcting that didn't solve the problem.
    Then I see this:form["totalRows"]
    When I'm used to seeing this:
    FORM.totalRows
    I've never seen the form["name"] before.  Does that actually work?
    I read somewhere that that's a more effective way of factoring the variable in the name of the form field as an alternative to Evaluate("form.field#row#"). I think it was somewhere on Ray Camden's blog, but it was a while ago. The only reason I used it there was for consistency. That  spot could easily have been FORM.totalRows, but the others would have to be either Evaluate("FORM.calendar#row#") or form["calendar" & row]. Again, I'm learning as I go, though, so I may have used it incorrectly. It's not throwing errors though, it's just reloading a blank page, as if it's submitting the form, but not actually processing the query. That's the confusing part to me.

  • Problem with SQL Query Action

    Hi,
    I have a problem in using transactions with SQL Querys.
    I developed a TA based an SQL Querys against a MS SQL Server by using the jtds driver.
    After execution of the sql query I iterate through the result data by using the repeater action on the xMII XML results of the query. Using the jtds driver all table and field names are in lower case letters.
    Now I changed the data server to test it with oracle to an oracle database by using the oracle jdbc driver. The database and tables on both Oracle and MS are created with the same sql script.
    The oracle driver returns table and field names in only capital letters. So the created transaction can not be used. Because it for example accesses the node "type" in the XML structure which is fine for jtds. But when oracle is used, the node has the name "TYPE", so the TA tries to use node type but there is only node TYPE that causes the TA to run into an error.
    Anyone has an idea how to avoid / solve this problem?
    Regards
    Timo

    That's exactly what I used as solution now.
    Instead of doing
    "select fieldname from tablename"
    I do now
    "select fieldname as "fieldname" from tablename"
    So both in Oracle and Microsoft SQL Server the returned field names of the query are in lower case letters.
    Thank you for your help.
    Regards Timo

  • Problem in BW query wizard

    Hi,
    When i m opening bi query wizard..its showing error
    error:32003 service not found cannot find com.sap.portal.guimachine.BIlit.commandhand....
    I am using vc 6.0 and portal (EP 6.0 SP15).  I va imported 4 sda files from sp13 addons in portal.
    for EP kit its working fine but for BI kit its showing problem...
    regards

    Hi Amit,
    We add few addons on portal for visual composer.Till EP6.0 sp13 the addons had to be deployed separately onto portal,but since SP14 onwards these come with the portal patch itself and we don't have to deploy the .sda files explicitly for visual composer.
    The constructor of BWQueryFunction class which is being generated by the guimachine of Visual composer corresponds to that present in com.sap.portal.guimachine.BIKITapi.jar file present in SP13 addons and hence you get a compile time error when trying to deploy onto sp15 or sp16 portal.
    One solution to this problem is to deploy the visual composer addons corresponding to SP13.The jar file com.sap.portal.guimachine.BIKITapi.jar is present in com.sap.visualcomposer.BIKiT.sda file.
    Hope this solves your problem.
    Otherwise, try this one also :
    In BW Server -
    Go to transaction WSCONFIG, to configure Query_view_data Service
    Web service definition:- ‘query_view_data’ and then click on create Icon.
    Provide the URL (in our case it is: /sap/bw/xml/
    soap/queryview).This will also Create External aliases.
    Thanks in advance,
    Deep

Maybe you are looking for

  • I can't export my video from final cut pro.

    I'm having trouble exporting anything from final cut pro x because there isn't any share button that I was use to before. It pretty much seems like there are no options seeing as they have simplified it to the point where there are no longer any opti

  • I cannot print any adobe documents.

    Whenever I try to print the document, a box pops up that says the document cannot be printed.  Then it says that no pages were selected to print.  But pages WERE selected to print.  I selected them every way possible, even one at a time,and it will n

  • Migrating from Outlook 2007 to Entourage 2008

    15 days ago, I bought my first Mac after a 12-year gap. I have been trying to get my information from Outlook 2007 into Entourage 2008 without any luck. I've google'd and found that there are indirect paths only. (via mbox). My E08 refuses to recogni

  • Camera Raw sequence in CS2

    When I open dng images into Camera Raw (Photoshop CS2) they appear out of sequence, for example: 001, 003,002, 004. What do I need to do to correct that? Thanks.

  • DITA FM to RH?

    I'm evaluating the Tech. Comm. Suite and I'm trying to combine everything...DITA supported in FM, as well as using RH to convert such files to CHM. I'm having trouble converting to RH, I suspect because DITA tags topics only w/ "title". Are FM DITA-c