Executing Like Query

Hey Can Anyone tell me how ca i execute like query using jdbc odbc bridge
when i use the following syntax it gives me an error
select topicid,name,subject from topic where subject like("subject1%")
or
select topicid,name,subject from topic where subject like("subject1*")
both of the statements issue an error
Please Help
asap
Thanx

when i use the following syntax it gives me an error
select topicid,name,subject from topic where subject
like("subject1%")You need to use single quotes instead of double quotes.
SELECT topicid, name, subject FROM topic WHERE subject LIKE 'subject1%'

Similar Messages

  • Issue While executing the Query for Pagination using ROWNUM with like

    Issue While executing the Query for Pagination using ROWNUM with like.
    Database is Oracle11G.
    Oracle Database Table contains 8-9 lakh records
    1) SQL equal (=)
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE A.REFERENCE = 'KMF22600920'
    Execution Time:- 0.00869245 seconds
    Returns 2 resultsets
    2) SQL like (one %)
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE A.REFERENCE = 'KMF22600920%'
    Execution Time:- 0.01094301 seconds
    Returns 2 resultsets
    3) SQL like (two%)
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE A.REFERENCE like '%KMF22600920%'
    Execution Time:- 6.43989658 seconds
    Returns 2 resultsets
    In Pagination, we are using Modified version of SQL Query 3) with ROWNUM as mentioned below :-
    4) SELECT * FROM (
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE REFERENCE like '%KMF22600920%' AND ROWNUM <= 20 ) WHERE RNUM > 0
    Execution Time:- Infinite
    ResultSets:- No as execution time is infinite
    a) Instead of like if we use = in the above query it is returning the 2 resultsets (execution time 0.02699282 seconds)
    b) Instead of two % in the above query, if use one example REFERENCE like 'KMF22600920%' it is returning the 2 resultsets (execution time 0.03313019 seconds)
    Issue:- When using two % in like in the above query i.e. REFERENCE like '%KMF22600920%' AND ROWNUM <= 20 ) , it is going to infinite.
    Could you please let us know what is the issue with two % used in like and rownum
    5) Modified version of Option1 query (move out the RNUM condition AND RNUM <= 20)
    SELECT * FROM (
    SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A
    WHERE REFERENCE like '%KMF22600920%' ) WHERE RNUM > 0 AND RNUM <= 20
    Execution Time:- 7.41368914 seconds
    Returns 2 resultsets
    Is the above query is best optimized query which should be used for the Pagination or still can improve on this ?

    This would be easier to diagnose if there was an explain plan posted for the 'good' and 'bad' queries. Generally speaking using '%' on both sides precludes the use of any indexes.

  • How Can I Execute Sql Query in Managed bean?

    Hi,
    I want to execute sql query in managedbean and get the query result. How can I do?
    Best wishes!

    You can do this by having current Database connection your application is using like this
    public static synchronized DBTransaction getDBTransaction(){
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding vb = ctx.getApplication().createValueBinding("#{data}");
    BindingContext bc = (BindingContext)vb.getValue(ctx.getCurrentInstance());
    DataControl dc = bc.findDataControl("AppModuleDataControl");
    ApplicationModuleImpl am = ((ApplicationModuleImpl)(ApplicationModule)dc.getDataProvider());
    return am.getDBTransaction();
    and then user DBTransaction object to create Statement and PreparedStatement you can find those in java doc.

  • While executing the query getting an error u2018Page Not Foundu2019 in the bowser.

    Hello,
    I opened a Bex Query in Query Analyzer and clicked on the Execute button to execute the query in our portal site. But I am getting an error u2018Page Not Foundu2019 in the bowser.
    As I am new to BI,Kindly guide me through the steps.
    what all setting needs to be done?
    Regards,
    Rachel

    Hi,
    The Path is C:\WINDOWS\system32\drivers\etc\hosts
    You need to update "host file" in your server/in your PC. So ask Network people to do it and also you need to change your browser LANsettings.
    Eg:   11.11.8.161     BWQ1     BWQ1.***.com
    Like above you need to change in your host file.
    Thanks
    Reddy
    Edited by: Surendra Reddy on Nov 27, 2008 8:12 AM

  • Runtime error while executing infoset query

    Dear Experts,
    When we execute infoset query we get following dump :"
    " An SQL error occurred when accessing a table."
    Database error text........: "ORA-25153: Temporary Tablespace is Empty"
    Internal call code.........: "[RSQL/FTCH/EBAN ]"
    Please check the entries in the system log (Transaction SM21).
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    "DBIF_RSQL_SQL_ERROR" CX_SY_OPEN_SQL_DBC
    "/1BCDWB/SAPLIQG000000000015" or "/1BCDWB/LIQG000000000015U02"
    "/1BCDWB/IQG000000000015EXTR"
    can any one hve idea about the above error.
    With Best  Regards,
    Jaspal

    Hi Jaspal
    Looks like a BASIS issue.
    Check with BASIS, they need to regularly monitor the tablespace and file system, at OS level
    Regards
    Madhan D

  • Dump while executing the query on MProvider on Stock and Billing

    Hi,
    I am getting this dump while executing a Query on Multiprovider. Here Multiprovider is on Billing cube(z-cube) and 0IC_C03 cubes. In the report , I have KF of both cubes. I am sure I never faced this type of problem in version 3.5. It seems we are going back day by day because of version 7.0.
    A:
    1) I am not getting any error if I take Kfs of only Billing cube in the
    report on the multiprovider.
    2) But I am getting this problem by taking only KF from 0IC_c03 on this multiprovider .
    3) And also this problem is not raising in any queries(ofcourse same type) of those 2 cubes.
    4) Here Fiscal Variant is constant filter, and User will enter the Fiscal year.
    5) In the Columns area ,I have taken 12 selections each one restricted with one CALMONTH2.
    6) in Rows part I have 3 selections. Here 2 selections have Billing KF and other selection has Blockd Stock qty KF.
    B:
    The above dump is not raising if I take 12 selections on columns with a restriction on 0CALMONTH with Customer exit varible , but different offsets in selections. Here the Customer exit variable gets April of the User entered Financial year as the value.  But the problem is For all columns it is giving same Value for Stock KF even though we have different values in the system. Surprisingly issue is , Sales figures are comming proper.
    I am on Version 7 and patch 13. And  I am using Querydesigner 3.5.
    Dump message: GETWA_NOT_ASSIGNED
    <i>Short text:
        Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "RSDRC_NCUM_ROUTINES" had to be terminated because it has come across a statement that unfortunately cannot be executed.
    keywords:
    "GETWA_NOT_ASSIGNED" " "
    "RSDRC_NCUM_ROUTINES" or "RSDRC_NCUM_ROUTINES"
    "FILTER_SELDR"</i>
    Thanks and Regards,
    Anil Kumar Sharma .P
    Message was edited by:
            Anil Kumar Sharma
    Message was edited by:
            Anil Kumar Sharma

    OK,
    I come back to my question: you said "<i>But the problem is For all columns it is giving same Value for Stock KF even though we have different values in the system</i>"
    Can you say to which period this value correspond?
    This looks like you are missing some characteristic identification in your multi.
    Can you assess that?
    Do you have the same time periods in both cubes? I mean, do you have at least the periods used in your RKF / query in both cubes? Would you mind pasting your identification for time IObjs from table RSDICMULTIIOBJ?
    please see hereunder my identification for a sales and stock multicube
    INFOCUBE                       OBJVERS IOBJNM                         PARTCUBE                       PARTIOBJ                                                                               
    ZMC021                         A       0CALDAY                        ZICRT_C07                      0CALDAY                      
    ZMC021                         A       0CALMONTH                      ZICRT_020                      0CALMONTH                    
    ZMC021                         A       0CALMONTH                      ZICRT_C07                      0CALMONTH                    
    ZMC021                         A       0CALMONTH2                     ZICRT_020                      0CALMONTH2                   
    ZMC021                         A       0CALMONTH2                     ZICRT_C07                      0CALMONTH2                   
    ZMC021                         A       0CALQUART1                     ZICRT_020                      0CALQUART1                   
    ZMC021                         A       0CALQUART1                     ZICRT_C07                      0CALQUART1                   
    ZMC021                         A       0CALQUARTER                    ZICRT_020                      0CALQUARTER                  
    ZMC021                         A       0CALQUARTER                    ZICRT_C07                      0CALQUARTER                  
    ZMC021                         A       0CALWEEK                       ZICRT_C07                      0CALWEEK                     
    ZMC021                         A       0CALYEAR                       ZICRT_020                      0CALYEAR                     
    ZMC021                         A       0CALYEAR                       ZICRT_C07                      0CALYEAR                     
    ZMC021                         A       0FISCPER                       ZICRT_020                      0FISCPER                     
    ZMC021                         A       0FISCPER                       ZICRT_C07                      0FISCPER                     
    ZMC021                         A       0FISCPER3                      ZICRT_020                      0FISCPER3                    
    ZMC021                         A       0FISCVARNT                     ZICRT_020                      0FISCVARNT                   
    ZMC021                         A       0FISCVARNT                     ZICRT_C07                      0FISCVARNT                   
    ZMC021                         A       0FISCYEAR                      ZICRT_020                      0FISCYEAR                    
    ZMC021                         A       0FISCYEAR                      ZICRT_C07                      0FISCYEAR                    
    note that here ZICRT_020 is a monthly stock cube.
    hope that helps...
    Olivier.

  • Help needed in executing SQL query...

    Hi,
    I am very new to JDeveloper. Curently i am tryin to execute an SQL query from the BPEL process, the output of the query is to be mapped to a variable field from a target xsd file. the query is fairly simple, like
    SELECT emp
    FROM emp_table
    WHERE emp_id=123
    The target field, namely "employee", is an element from the xsd file. I tried using Java embedding activity to connect to the db and execute the query through a piece of Java code, but couldn't find a way to assign the output of the query to the field. however lately i also discovered the Database Adapter services which helps me create a database connection, but still i am not sure as of how to handle and map the output of the query to the variable field.
    Can somebody please help me in resolving the issue either through Java Embed activity or Database Adapter services??
    Thanks in advance
    Anjan

    Anjan,
    I suggest you try the [url http://forums.oracle.com/forums/forum.jspa?forumID=212]BPEL Forum
    John

  • Issue in executing contains Query(Oracle 11g Enterprise E on Linux RHEL 4

    Oracle Version: 11.1.0.6.0
    We are facing problem in executing contains Query :
    1.When length of string inside contains clause goes beyond 4000 it gives error ORA-01704: string literal too long
    2.We try to modify query by breaking it into multiple contains clause but it was not giving good performance (performance degrades as number of contains clauses increases.)It seems accessing same index multiple times becoming costly and taking more time. (We can see same domain Index has been accessed 3 times for 3 contains clause ()
    3.We used multiple varchar(4000) type bind variable in single contains clause but giving error
         ORA-29902: error in executing ODCIIndexStart() routine
         ORA-01489: result of string concatenation is too long
    4.We used bind variable of type clob but giving error
    Error:
    ORA-29902: error in executing ODCIIndexStart() routine
         ORA-20000: Oracle Text error:
         DRG-50857: oracle error in drexrstart_clob
    I read from article
    http://www.oracle.com/technology/products/text/pdf/ot11g_new_features.pdf
    That we don’t need to modified query as we had to do with SDATA(as we are doing in above examples) and optimizer will realize that query can be satisfied by the text index and will “push down” the filtering of rows into the text index processor rather than doing table access for filtering on sdata column but when I tried to write that query it was doing table access to filter for filter by column.
    My Questions:
    a.     Is it possible as mentioned in above point(point number 5) that we don’t need to write SDATA query in contains clause and optimizer will use composite index automatically.
    b.     Is there any workaround for using string literal > 4000 char in contains clause.
    c.     Why performance degrades lineally when using multiple contains clause.
    d.     Can we use in clause in SDATA and write query like this:
    i.     SDATA(queryid in ( 'q1',’q2’))
    /* Table */
    create table ContentStore (ResourceID raw(16), QueryID VARCHAR2(38),IFID VARCHAR2(38),ISTimeStamp number,ISProtocolName VARCHAR2(100),ismimecontenttype varchar2(100),ISToBeDisplayed number(1),IndexedMetaText CLOB)
    /* Index */
    create index idxMeta on ContentStore (IndexedMetaText) indextype is ctxsys.context filter by queryid,IFID,istimestamp,isprotocolname,ismimecontenttype,resourceid,istobedisplayed order by istimestamp desc parameters('filter ctxsys.null_filter section group GRP_system2 sync(every "sysdate+1/(24*4)" MEMORY 209715200 PARALLEL 2) storage my_text_storage memory 209715200')parallel 2
    /* GRP_system2*/
    begin
    ctx_ddl.create_section_group('GRP_system2', 'BASIC_SECTION_GROUP');
    ctx_ddl.add_field_section('GRP_system2', 'FILENAME', 'FILENAME');
    ctx_ddl.add_field_section('GRP_system2', 'ISIPSrcIP', 'ISIPSrcIP');
    ctx_ddl.add_field_section('GRP_system2', 'ISProxyUserIP', 'ISProxyUserIP');
    ctx_ddl.add_field_section('GRP_system2', 'isipdestip', 'isipdestip');
    end;
    /* 1.When length of string inside contains clause goes beyond 4000 it gives
         error ORA-01704: string literal too long */
    select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''c7d7fdb3-e532-42f1-a8b4-450771fc763f'')) or (sdata(queryid = ''7746f95a-01ba-4318-991a-35c2a8a0c73d'')) or (sdata(queryid = ''b0d339d2-ada9-485b-b752-79920a589340'')) or (sdata(queryid = ''33083cc8-7ed0-4a67-81f0-de1f3d673db2'')) or (sdata(queryid = ''0475dea9-288b-4be6-815e-751c98c25f2b'')) or (sdata(queryid = ''8cfb62f4-2bac-4da6-a2c2-84e409f5a810'')) or (sdata(queryid = ''afbf17a7-4170-45f4-9b66-de3860de93d7'')) or (sdata(queryid = ''750a7b1c-db61-4f87-b78f-505bc73aa5df'')) or (sdata(queryid = ''debc06f3-51a8-4278-9d38-f316dfb6340c'')) or (sdata(queryid = ''d2d8d8a8-b691-439f-b6de-618825aad152'')) or (sdata(queryid = ''f6a3515a-4c7b-48d0-8d46-f62541525cd0'')) or (sdata(queryid = ''bef5c527-5e78-494f-832c-12b3967f22cc'')) or (sdata(queryid = ''638a4029-c4bf-42ef-87bc-2cd4a3977dd1'')) or (sdata(queryid = ''1ce38c22-fd80-4d0f-b9ab-1a09941c5809'')) or (sdata(queryid = ''7bbbcc66-f19d-4758-bdd8-2796da1e26fe'')) or (sdata(queryid = ''d3e96050-ab5e-48b7-9445-d884167c8ae9'')) or (sdata(queryid = ''eaf93ce1-fbd8-4bb6-9fb1-12c337878c72'')) or (sdata(queryid = ''ef1ce7ce-9b4a-4f10-9c91-7256f513c709'')) or (sdata(queryid = ''46bf5cda-ada3-41f2-92b0-174ac29c5808'')) or (sdata(queryid = ''59136e92-147f-41c4-ac75-79d921268714'')) or (sdata(queryid = ''fb2382b2-6496-4c9f-a427-2f6db3b9fd16'')) or (sdata(queryid = ''531b3790-ed50-4b83-a0d0-eabfed2b6701'')) or (sdata(queryid = ''4908b148-2432-4041-947c-31ff8e10646c'')) or (sdata(queryid = ''82007d26-d526-42c9-a8d0-5b75e7f08b90'')) or (sdata(queryid = ''002735e8-6886-4bb4-a732-8a9d04165837'')) or (sdata(queryid = ''43f25cba-1d90-4cc2-84d1-a8719c5b1c9f'')) or (sdata(queryid = ''99d9027f-948b-4bc7-9a44-3092d6b29580'')) or (sdata(queryid = ''24221285-ea64-4e14-8c08-a173ec1b7fd9'')) or (sdata(queryid = ''47ad81d7-75cb-4787-91ab-c2bc5c5e1aaa'')) or (sdata(queryid = ''4ff2846f-6d70-4f9b-a5bf-317263c0ccc5'')) or (sdata(queryid = ''c1f5fbe7-72d1-499d-8d72-4aa21a79c97e'')) or (sdata(queryid = ''356f12c5-a769-478d-b57b-8a063be8ee8e'')) or (sdata(queryid = ''f6181853-2e16-4bce-88c0-6602bc853935'')) or (sdata(queryid = ''890f80e9-f3dd-4862-a55c-4f76569df360'')) or (sdata(queryid = ''5e9df138-8377-4841-92de-49bf6ed378a5'')) or (sdata(queryid = ''600b4dfd-e379-4754-8d06-873b593dbd14'')) or (sdata(queryid = ''af1476ac-3742-4272-bc97-584b1bbe3e2b'')) or (sdata(queryid = ''c2eb4e4c-2d09-4be8-b6ba-f1440349ed5a'')) or (sdata(queryid = ''2b819cdb-0941-48fd-8b93-dd1f661933b3'')) or (sdata(queryid = ''dfa094c9-c48c-4ca1-ad06-ead4f1a9d146'')) or (sdata(queryid = ''b1222061-acaf-4e85-80e1-00af07df962c'')) or (sdata(queryid = ''219b0c7b-266e-455b-b7ca-4f760976253c'')) or (sdata(queryid = ''2396f1e3-28f8-451b-a114-29390cec0cf3'')) or (sdata(queryid = ''c7d7fdb3-e532-42f1-a8b4-450771fc763f'')) or (sdata(queryid = ''7746f95a-01ba-4318-991a-35c2a8a0c73d'')) or (sdata(queryid = ''b0d339d2-ada9-485b-b752-79920a589340'')) or (sdata(queryid = ''33083cc8-7ed0-4a67-81f0-de1f3d673db2'')) or (sdata(queryid = ''0475dea9-288b-4be6-815e-751c98c25f2b'')) or (sdata(queryid = ''8cfb62f4-2bac-4da6-a2c2-84e409f5a810'')) or (sdata(queryid = ''afbf17a7-4170-45f4-9b66-de3860de93d7'')) or (sdata(queryid = ''750a7b1c-db61-4f87-b78f-505bc73aa5df'')) or (sdata(queryid = ''debc06f3-51a8-4278-9d38-f316dfb6340c'')) or (sdata(queryid = ''d2d8d8a8-b691-439f-b6de-618825aad152'')) or (sdata(queryid = ''f6a3515a-4c7b-48d0-8d46-f62541525cd0'')) or (sdata(queryid = ''bef5c527-5e78-494f-832c-12b3967f22cc'')) or (sdata(queryid = ''638a4029-c4bf-42ef-87bc-2cd4a3977dd1'')) or (sdata(queryid = ''1ce38c22-fd80-4d0f-b9ab-1a09941c5809'')) or (sdata(queryid = ''7bbbcc66-f19d-4758-bdd8-2796da1e26fe'')) or (sdata(queryid = ''d3e96050-ab5e-48b7-9445-d884167c8ae9'')) or (sdata(queryid = ''eaf93ce1-fbd8-4bb6-9fb1-12c337878c72'')) or (sdata(queryid = ''ef1ce7ce-9b4a-4f10-9c91-7256f513c709'')) or (sdata(queryid = ''46bf5cda-ada3-41f2-92b0-174ac29c5808'')) or (sdata(queryid = ''59136e92-147f-41c4-ac75-79d921268714'')) or (sdata(queryid = ''fb2382b2-6496-4c9f-a427-2f6db3b9fd16'')) or (sdata(queryid = ''531b3790-ed50-4b83-a0d0-eabfed2b6701'')) or (sdata(queryid = ''2396f1e3-28f8-451b-a114-29390cec0cf3''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    order by istimestamp desc ) where rownum <= 250)
    /* 2.We try to modify query by breaking it into multiple contains clause but it was not giving good performance (performance degrades as number of contains clauses increases.)
    Problem: - Performance of below query degrades linearly as number of contains clause for same column increases.
    Execution plan :
    It seems accessing same index multiple times becoming costly and taking more time. (We can see same domain Index has been accessed 3 times for 3 contains clause ()
    select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where
    contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''c7d7fdb3-e532-42f1-a8b4-450771fc763f'')) or (sdata(queryid = ''7746f95a-01ba-4318-991a-35c2a8a0c73d'')) or (sdata(queryid = ''b0d339d2-ada9-485b-b752-79920a589340'')) or (sdata(queryid = ''33083cc8-7ed0-4a67-81f0-de1f3d673db2'')) or (sdata(queryid = ''0475dea9-288b-4be6-815e-751c98c25f2b'')) or (sdata(queryid = ''8cfb62f4-2bac-4da6-a2c2-84e409f5a810'')) or (sdata(queryid = ''afbf17a7-4170-45f4-9b66-de3860de93d7'')) or (sdata(queryid = ''750a7b1c-db61-4f87-b78f-505bc73aa5df'')) or (sdata(queryid = ''debc06f3-51a8-4278-9d38-f316dfb6340c'')) or (sdata(queryid = ''d2d8d8a8-b691-439f-b6de-618825aad152'')) or (sdata(queryid = ''f6a3515a-4c7b-48d0-8d46-f62541525cd0'')) or (sdata(queryid = ''bef5c527-5e78-494f-832c-12b3967f22cc'')) or (sdata(queryid = ''638a4029-c4bf-42ef-87bc-2cd4a3977dd1'')) or (sdata(queryid = ''1ce38c22-fd80-4d0f-b9ab-1a09941c5809'')) or (sdata(queryid = ''7bbbcc66-f19d-4758-bdd8-2796da1e26fe'')) or (sdata(queryid = ''d3e96050-ab5e-48b7-9445-d884167c8ae9'')) or (sdata(queryid = ''eaf93ce1-fbd8-4bb6-9fb1-12c337878c72'')) or (sdata(queryid = ''ef1ce7ce-9b4a-4f10-9c91-7256f513c709'')) or (sdata(queryid = ''46bf5cda-ada3-41f2-92b0-174ac29c5808'')) or (sdata(queryid = ''59136e92-147f-41c4-ac75-79d921268714'')) or (sdata(queryid = ''fb2382b2-6496-4c9f-a427-2f6db3b9fd16'')) or (sdata(queryid = ''531b3790-ed50-4b83-a0d0-eabfed2b6701'')) or (sdata(queryid = ''4908b148-2432-4041-947c-31ff8e10646c'')) or (sdata(queryid = ''82007d26-d526-42c9-a8d0-5b75e7f08b90'')) or (sdata(queryid = ''002735e8-6886-4bb4-a732-8a9d04165837'')) or (sdata(queryid = ''43f25cba-1d90-4cc2-84d1-a8719c5b1c9f'')) or (sdata(queryid = ''99d9027f-948b-4bc7-9a44-3092d6b29580'')) or (sdata(queryid = ''24221285-ea64-4e14-8c08-a173ec1b7fd9'')) or (sdata(queryid = ''47ad81d7-75cb-4787-91ab-c2bc5c5e1aaa'')) or (sdata(queryid = ''4ff2846f-6d70-4f9b-a5bf-317263c0ccc5'')) or (sdata(queryid = ''c1f5fbe7-72d1-499d-8d72-4aa21a79c97e'')) or (sdata(queryid = ''356f12c5-a769-478d-b57b-8a063be8ee8e'')) or (sdata(queryid = ''f6181853-2e16-4bce-88c0-6602bc853935'')) or (sdata(queryid = ''890f80e9-f3dd-4862-a55c-4f76569df360'')) or (sdata(queryid = ''5e9df138-8377-4841-92de-49bf6ed378a5'')) or (sdata(queryid = ''600b4dfd-e379-4754-8d06-873b593dbd14'')) or (sdata(queryid = ''af1476ac-3742-4272-bc97-584b1bbe3e2b'')) or (sdata(queryid = ''c2eb4e4c-2d09-4be8-b6ba-f1440349ed5a'')) or (sdata(queryid = ''2b819cdb-0941-48fd-8b93-dd1f661933b3'')) or (sdata(queryid = ''dfa094c9-c48c-4ca1-ad06-ead4f1a9d146'')) or (sdata(queryid = ''b1222061-acaf-4e85-80e1-00af07df962c'')) or (sdata(queryid = ''219b0c7b-266e-455b-b7ca-4f760976253c'')) or (sdata(queryid = ''2396f1e3-28f8-451b-a114-29390cec0cf3''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    or
    contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''f22c0b85-2e72-4450-92b7-8f9864c2517a'')) or (sdata(queryid = ''dbc6111b-5fef-4925-93f0-ecf94aa2305b'')) or (sdata(queryid = ''5d737150-3c55-4582-8b2e-8039615b8e69'')) or (sdata(queryid = ''fc8bf42c-2c7a-4506-aa3a-89266ef09ceb'')) or (sdata(queryid = ''7d3f7561-ba99-49fd-9492-214d9f571831'')) or (sdata(queryid = ''73110ce8-6930-4044-90f7-9c5d27bc0b10'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or (sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or (sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or (sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or (sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or (sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or (sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or (sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or (sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or (sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or (sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or (sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or (sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or (sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982'')) or (sdata(queryid = ''e5f133c5-f8d3-4905-b4db-ceba89476e7d'')) or (sdata(queryid = ''27dd1a53-a158-46ea-b38d-31a57bd7154e'')) or (sdata(queryid = ''cc335826-5e5e-4d4c-9406-2050717bea5d'')) or (sdata(queryid = ''e1ca6d4d-0005-43ec-a121-5574b37231ec'')) or (sdata(queryid = ''4be550f1-8e0a-4748-8186-50228531751d'')) or (sdata(queryid = ''8637ff63-3d0d-4451-9e40-b890d197f6cd'')) or (sdata(queryid = ''5f664e9e-b72f-4ae7-b69d-081ab7873146'')) or (sdata(queryid = ''baecc6fb-e9cf-41df-9fa4-1793b510d474'')) or (sdata(queryid = ''fa27ba4c-4ab8-4bd0-8725-a03c4666dcde'')) or (sdata(queryid = ''918bfb52-7323-4046-b96a-4ef905687dbb'')) or (sdata(queryid = ''3faad930-81c6-421b-84aa-81a9cfdc2c8b'')) or (sdata(queryid = ''7dc5033d-3a27-4058-885a-d103e73328f2'')) or (sdata(queryid = ''8eb4a0ce-654b-42f0-a868-7f7fdb483a13'')) or (sdata(queryid = ''1b44713f-6cbf-4b49-b851-5a500b221c27'')) or (sdata(queryid = ''11febb09-9106-4b92-a43d-cb71696adc90'')) or (sdata(queryid = ''1d84ca10-375e-4e17-a1c0-03515e1cfe5b'')) or (sdata(queryid = ''9cf1f3fd-136c-4abb-8319-6f6c6ddc514c'')) or (sdata(queryid = ''24f5347a-ff20-4245-a4dc-eb2f8c918c91'')) or (sdata(queryid = ''2640ef3c-8a20-4f28-92df-0bc19b058d91'')) or (sdata(queryid = ''af3d0817-0d40-4adb-9655-a5460805a7eb'')) or (sdata(queryid = ''77b86c41-3afc-4c9c-9432-d7a1ee979af2'')) or (sdata(queryid = ''2a26f0d8-1162-4f34-be48-65b409abef28'')) or (sdata(queryid = ''649810b8-0d7b-47ab-8433-8e9bba88583d'')) or (sdata(queryid = ''c4f853ef-cd7c-436d-a16d-03d49681bee6'')) or (sdata(queryid = ''5c1896ce-06af-406c-bfbd-40d2349171bd'')) or (sdata(queryid = ''8d9fe822-f720-4ee5-a80d-552edd778f82'')) or (sdata(queryid = ''f30220c6-5638-47ec-ad98-4768ee299232'')) or (sdata(queryid = ''3faf5d0b-e3c0-4b68-8244-e07334c17326''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    or
    contains(indexedmetatext,'((68.142.91.152 within isipsrcip) or (68.142.91.152 within isproxyuserip) or (68.142.91.152 within isipdestip)) and ((sdata(queryid = ''c3662b10-98fc-453d-86e1-0c81fe3bb038'')) or (sdata(queryid = ''2b4e7f6e-7871-45eb-b046-bfd4f5d2d84c'')) or (sdata(queryid = ''5af44897-0bc9-4307-bcb1-7f07750e1e25'')) or (sdata(queryid = ''2b57feb3-1681-48db-9856-5d23d69de605'')) or (sdata(queryid = ''47c3939e-d46d-4c7f-9a42-305634642a72'')) or (sdata(queryid = ''476a04ad-6be3-459b-8ab1-6e270416add6'')) or (sdata(queryid = ''61be42b4-11d6-4ff9-a06d-e896690d7fd4'')) or (sdata(queryid = ''97a00e72-2e7d-4c02-b41b-d9d1601bc08c'')) or (sdata(queryid = ''8739fefa-c015-4912-999e-cd9524dffedb'')) or (sdata(queryid = ''61054068-5892-4aaf-ab31-9e6301de9808'')) or (sdata(queryid = ''741a5302-aadc-4bf2-bdcf-b41e95b49d05'')) or (sdata(queryid = ''c13d9ec0-2b18-4838-9bdb-ddb0686fd1d5'')) or (sdata(queryid = ''b02a2176-0ba5-47f4-843d-3d54e3faad77'')) or (sdata(queryid = ''451b906e-3a5c-4ed2-9d94-0a603e6ad94d'')) or (sdata(queryid = ''d1c767d7-cd0a-44c5-a8ff-ce5fa4522ece'')) or (sdata(queryid = ''ca71a03e-26c6-43f3-9755-a248ebaf35b5'')) or (sdata(queryid = ''d93777b8-f03b-49b0-94fc-8019b52c0637'')) or (sdata(queryid = ''e05ebc73-51cb-4112-b685-5104c4884020'')) or (sdata(queryid = ''a1b342c7-9ce0-4aa1-96e8-74621b34d411'')) or (sdata(queryid = ''bde5de4a-b1d4-4edd-9033-6bcba45fcfc2'')) or (sdata(queryid = ''1e345627-c639-4349-95d0-fdfe348935df'')) or (sdata(queryid = ''bd33b778-83c1-4610-a767-f8ce2ade5339'')) or (sdata(queryid = ''54eaa539-e50a-4e95-8d94-f7e95cf0f57b'')) or (sdata(queryid = ''3181ef7a-77cd-405f-9dfa-1c13444efb82'')) or (sdata(queryid = ''0a72bf53-c8ca-405f-9098-9383ed02815a'')) or (sdata(queryid = ''2fb2fff2-b240-46a6-99b8-00521b4325e4'')) or (sdata(queryid = ''5321fa18-a88d-45cb-b8d6-383180cb308b'')) or (sdata(queryid = ''f13bcfdf-d61f-4871-9c74-23ea58204cbb'')) or (sdata(queryid = ''eb5188da-3659-4e7a-b9e4-6985624c3867'')) or (sdata(queryid = ''1679a0ee-6fa7-4c5b-9e0f-09512bc6a74b'')) or (sdata(queryid = ''fd05f61b-5c63-4f99-975e-573ca0f68e8e'')) or (sdata(queryid = ''10802bc7-28bd-43d4-aa24-cf5f9cf6d19f'')) or (sdata(queryid = ''302dbebf-4edd-43a8-93e9-dd6faec8ff14'')) or (sdata(queryid = ''573020da-b5c1-489a-a7d9-eae363e535ef'')) or (sdata(queryid = ''ca514f9e-f4b9-42eb-a8b3-57a384e65540''))) and (sdata(istobedisplayed = 1)) and (sdata(istimestamp >= 1245283200)) and (sdata(istimestamp < 1245369600)) and ((sdata(IFID = ''1eeb7036-cd84-4e4d-be90-e720c7db4470'')))') > 0
    order by istimestamp desc ) where rownum <= 250)
    /* 3.We used multiple varchar(4000) type bind variable in single contains clause but giving error
         ORA-29902: error in executing ODCIIndexStart() routine
         ORA-01489: result of string concatenation is too long
         variable querystring1 varchar2(4000);
    exec :querystring1 := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
    variable querystring2 varchar2(4000);
    exec :querystring2 := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
    variable querystring3 varchar2(4000);
    exec :querystring3 := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
         select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where contains(indexedmetatext,:querystring1|| ' or ' ||:querystring2|| ' or ' ||:querystring3) > 0 order by istimestamp desc ) where rownum <= 250);
    /* 4.We used bind variable of type clob but giving error
    Error:
    ORA-29902: error in executing ODCIIndexStart() routine
         ORA-20000: Oracle Text error:
         DRG-50857: oracle error in drexrstart_clob
    variable querystring CLOB;
    exec :querystring := '((sdata(queryid = ''a51f216a-b211-4b59-89d4-6fcce58a8517'')) or (sdata(queryid = ''d1c975a6-607d-4334-a84c-cc63f68bda3a'')) or(sdata(queryid = ''11fd0d2a-540d-4de0-852a-75f1b841b262'')) or(sdata(queryid = ''0dbfd826-497e-4283-8fc6-210c631c4a3e'')) or(sdata(queryid = ''eb2fd3d3-3b14-4092-a373-edd5448802c2'')) or(sdata(queryid = ''a3b69f62-560b-4883-8bd8-d8225af075b4'')) or(sdata(queryid = ''8596dc3e-c062-4527-9df6-e2c6aa10187d'')) or(sdata(queryid = ''5ce0dea4-b005-4185-9a05-7e91f14c7a8a'')) or(sdata(queryid = ''27eb925f-6f0c-4e27-9b57-91d78de703df'')) or(sdata(queryid = ''53b63124-caf4-4e71-ac5b-0e323d2805cb'')) or(sdata(queryid = ''f3dea938-a547-4510-8c24-25e04fa11ec4'')) or(sdata(queryid = ''5d8ebe7d-224b-4731-a1f2-ef1e3b409579'')) or(sdata(queryid = ''69c8dc53-031a-4069-a9e5-89f28cb7a7e0'')) or(sdata(queryid = ''2f65dc5e-63f6-4904-95f8-94c8983931a9'')) or(sdata(queryid = ''9ce16005-5b3b-4691-a624-5a7835e9e982''))) ';
    select indexedmetatext from ContentStore where rowid in ( select oraclerowid from ( select rowid as oraclerowid from ContentStore where contains(indexedmetatext,:querystring) > 0 order by istimestamp desc ) where rownum <= 250);
    /* 5.I read from article
    http://www.oracle.com/technology/products/text/pdf/ot11g_new_features.pdf
    That we don’t need to modified query as we had to do with SDATA(as we are doing in above examples) and optimizer will realize that query can be satisfied by the text index and will “push down” the filtering of rows into the text index processor rather than doing table access for filtering on sdata column but when I tried to write that query it was doing table access to filter for filter by column.
    /* 6.My Questions:
    a.     Is it possible as mentioned in above point(point number 5) that we don’t need to write SDATA query in contains clause and optimizer will use composite index automatically.
    b.     Is there any workaround for using string literal > 4000 char in contains clause.
    c.     Why performance degrades lineally when using multiple contains clause.
    d.     Can we use in clause in SDATA and write query like this:
    i.     SDATA(queryid in ( 'q1',’q2’))
    */

    SQE is really breakthrough for me but I dont know why it is not working in my case.I tried it onOracle 11g installaion with window and Linux both but did not get success.
    Please suggest me what I need to check when Installing if it is installation problem?
    My attempt:
    [oracle@oracle2 ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Jul 6 12:21:32 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create user test identified by test;
    User created.
    SQL> grant connect,dba,resource,ctxapp to test;
    Grant succeeded.
    SQL> connect test/test@content;
    Connected.
    SQL> create table test (text varchar2(2000));
    Table created.
    SQL> insert into test values ('hello world');
    1 row created.
    SQL> create index testindex on test(text) indextype is ctxsys.context;
    Index created.
    SQL> exec ctx_query.store_sqe('testsqe', 'hello')
    PL/SQL procedure successfully completed.
    SQL> select * from test where contains (text, 'sqe(testsqe)') > 0;
    select * from test where contains (text, 'sqe(testsqe)') > 0
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-00100: internal error, arguments : [50935],[drpn.c],[1051],[],[]
    ORA-01403: no data found
    SQL> select * from test where contains (text, 'ctx_query.sqe(testsqe)') > 0;
    no rows selected
    SQL>

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • Error Executing Database Query - Help!

    I have a cfquery code that looks like this:
        <CFQUERY DATASOURCE="mydatabase" USERNAME="myuser" PASSWORD="mypassword" NAME="codelist" CACHEDWITHIN="#CreateTimeSpan(0,1,0,0)#">
        SELECT *
        FROM systemcode
        WHERE (LEN(TRIM(systemcode)) = 2 OR LEN(TRIM(systemcode)) = 4)
        <CFSWITCH EXPRESSION="#CAT#">
        <CFCASE VALUE="1">AND (MID(systemcode,1,2) BETWEEN '01' AND '05')</CFCASE>
        <CFCASE VALUE="2">AND (MID(systemcode,1,2) BETWEEN '06' AND '15')</CFCASE>
        <CFCASE VALUE="3">AND (MID(systemcode,1,2) BETWEEN '16' AND '24')</CFCASE>
        <CFCASE VALUE="4">AND (MID(systemcode,1,2) BETWEEN '25' AND '27')</CFCASE>
        <CFCASE VALUE="5">AND (MID(systemcode,1,2) BETWEEN '28' AND '38')</CFCASE>
        <CFCASE VALUE="6">AND (MID(systemcode,1,2) BETWEEN '39' AND '40')</CFCASE>
        <CFCASE VALUE="7">AND (MID(systemcode,1,2) BETWEEN '41' AND '43')</CFCASE>
        <CFCASE VALUE="8">AND (MID(systemcode,1,2) BETWEEN '44' AND '49')</CFCASE>
        <CFCASE VALUE="9">AND (MID(systemcode,1,2) BETWEEN '50' AND '63')</CFCASE>
        <CFCASE VALUE="10">AND (MID(systemcode,1,2) BETWEEN '64' AND '67')</CFCASE>
        <CFCASE VALUE="11">AND (MID(systemcode,1,2) BETWEEN '68' AND '71')</CFCASE>
        <CFCASE VALUE="12">AND (MID(systemcode,1,2) BETWEEN '72' AND '83')</CFCASE>
        <CFCASE VALUE="13">AND (MID(systemcode,1,2) BETWEEN '84' AND '85')</CFCASE>
        <CFCASE VALUE="14">AND (MID(systemcode,1,2) BETWEEN '86' AND '89')</CFCASE>
        <CFCASE VALUE="15">AND (MID(systemcode,1,2) BETWEEN '90' AND '97')</CFCASE>
        <CFCASE VALUE="16">AND (MID(systemcode,1,2) BETWEEN '98' AND '99')</CFCASE>
        <CFDEFAULTCASE><CFLOCATION URL="somewhere.htm"></CFDEFAULTCASE>
        </CFSWITCH>
        ORDER BY systemcode
        </CFQUERY>
    This works perfectly in CF 5.  However, when running in CF 8 I am getting the error message:
    Error Executing Database Query.FUNCTION mydatabase.LEN does not exist The specific sequence of files included or processed is: /home/httpd/vhosts/somedomain.com/httpdocs/reference/systemcode.cfm, line: 24
    (that refers to the above cfquery)
    "mydatabase" is the name of the database and LEN is a function.    It's checking for the length of systemcode to be 2 or 4, if they are then check if the value of #CAT# is 1 and that the first 2 characters is between 01 and 05 then select the row.  I don't know why it works with CF5 but not CF8?  It's driving me nuts.  Any help is appreciated.

    I just don't see why
    all of a sudden it doesn't work with CF8 and MySQL,
    If you changed databases, that is the source of the problem, not upgrading CF.  MySQL will not understand MS Access specific functions and vice versa. Do not expect queries written for one database type to automatically work with another.  While there are sql standards, every database is different. It is quite common for database vendors to have totally different function names, data types and even syntax. You will need to throrougly review your database queries and convert any Access specific syntax, data types, etcetera to the MySQL equivalents.
    Are there MySQL equivalent for these two functions (TRIM and
    LEN)?
    Yes. See the string functions section in the online mySQL docs.
    http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
    I don't konw there was a TRIM and LEN in MS Access
    database.  I guess I was mixing them.
    Yes. It is a little confusing because both CF and MS Access have those functions.  In this specific case you were using the Access functions, not CF.
            http://www.techonthenet.com/access/functions/index_alpha.php
    >> Yes, I did put a
    CFLOCATION inside the cfquery.  Never encounter that
    scenario so I didn't know if it works.
    Well if you are using the code, it should be something you have tested. So you know how it behaves. But CFLOCATION really does not belong inside a database query.
    `

  • Is it possible to change the column headings when ever i execute the query

    in the runtime i want to change the column headings is that is possible.
    Ex: if write a timestampadd(.......) function in the table heading is that change the dates automatically whenever i execute the query?
    is this is possible?
    Product name 1-2-10 5-6-10
    aaaa 5 6
    bbfff 6 10

    Product name 1-2-10 5-6-10
    aaaa 5 6
    bbfff 6 10It looks like the dates are values in a column? Put that column in the Columns section of the Pivot Table and Product Name in the Rows section and it should produce what you are looking for.
    Edited by: David_T on May 19, 2010 2:33 PM

  • Is there a way to not to execute a query on table rendering?

    Is there a way to not to execute a query associated with an af:table on table rendering on the page?
    I would like to control this programmatically.
    Any examples will be much appreciated.

    Yes, there is.
    {thread:id=2362354}

  • GETTING NOT ASSIGNED WHILE EXECUTING THE QUERY

    Hi Experts,
    i have one query on 0sd_c03, while i am executing this query i am getting 'notassingned' in some keyfigures like "width,length,grade,grade series,quality". but i have the data in datatarget.
    what is the problem,what is the solution for this.
    pl help me,
    thanks & regards
    venkat

    hi,
    is the report is on cube/ over multiprovider. if the report is multiprovider then chk all the fields in the identifcation is properly assigned to the infoproviders(cubes).
    if u have more than one cube then this issue might happen.
    any way, chk for the codntions/filters/restrcition for key figures at the report level.
    Ramesh

  • How can i know which index will be used when executing the query ?

    1 ) I have query in which i have 3-4 tables but there multiple index on one column .
    so how can i know which index will be used when executing the query ?
    2) I have a query which ia taking too much time . how can i know which table is taking too much time ?
    3) Please Provide me some document of EXplain plan ?

    Hi Jimmy,
    Consider the below example
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    CREATE TABLE FIRST AS
    SELECT * FROM all_objects;
    UPDATE FIRST
    SET object_name = 'TEST'
    WHERE owner != 'SCOTT';
    CREATE INDEX idx_first ON FIRST(object_name);
    SELECT *
    FROM FIRST
    WHERE object_name = 'TEST';
    It has not used index
    Execution Plan
    Plan hash value: 2265626682
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 58678 | 7334K| 163 (4)| 00:00:02 |
    |* 1 | TABLE ACCESS FULL| FIRST | 58678 | 7334K| 163 (4)| 00:00:02 |
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    SELECT *
    FROM FIRST
    WHERE object_name = 'emp';
    This has used the index
    Execution Plan
    Plan hash value: 1184810458
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 128 | 1 (0)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| FIRST | 1 | 128 | 1 (0)| 00:00:01 |
    |* 2 | INDEX RANGE SCAN | IDX_FIRST | 1 | | 1 (0)| 00:00:01 |
    From this we can come to the conclusion that, whether to use one index or not by oracle
    would also depend on the data which is present in the table. This has to be this way as
    we see in the bind peeking, if oracle sticks to only one plan, say only use the full table
    scan, it would be a performance hit when it searches for the second query ie where object_name
    ='emp';
    2.
    If we have a query like below.
    select * from emp
    where upper(ename) = upper(:p_ename);
    Evenif we have the index on ename column, oracle wouldn't be able to use the index, as there is a function in the predicate column. If you need oracle to use the index, we need to create a function based index as below.
    Create index idx_ename on emp(upper(ename));
    Regards,
    Cool

  • Error in executing SQL query

    Hi All,
    I am working with labview application.
    The database being used is Access.
    The tables i have to use contains the special symbol -   (not underscore.)
    Let the table name be user-data
    When i am executing the query select * from user-data its showing
    error message syntax error in from clause.
    I tried just typing the query in access also and got the same error.
    I believe its because of the usage of the special character other than underscore in table name
    Many applications using the same database is running in VB already.So there is no way for me to rename the table.
    I know i am asking an invalid question.But still....
    Is there any way for me to use the same table name and execute sql query.
    Thanks in advance

    There should be. Try putting the table name in quotes - some DBMS use single quotes, some use double quotes. For example say the table name has a space in it. Try something like:
    select * from 'a funny table';
    or
    select * from "a funny table";   (Actually, I think I'd try this one first...)
    Failing this, you have two choices: change the name of the table, or dump Access and go with a real DBMS - which you will probibly want to do anyway because it will only be a matter of time before you start hitting a performance wall. Access is particularly bad if you have more than one process making a connection to it at a time. Interms of alternatives, there are a couple really good open-source products out there, as well as no-cost versions of Oracle and SQL-Server.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • How do I share one iCloud Photo Library

    We are in our late 60's (years of age). We have 3,500 pics on the Mac, I now have PHOTOS on my Mac, my iPhoto Library is 8.99GB.  I am almost ready to jump to use iCloud Photo Library. I know I will need to up it to 20GB @ .99 cents a month (a deal i

  • [Solved] Random Freezes Requiring Manual Power off

    Since I built this system, I've been getting random freezes that force me to have to manually power off and back on the entire system.  I have no idea what's causing it and I've tried everything under the sun that I can think of to resolve it to no a

  • Moving to OID, but...

    hi! currently i'm using the Oracle 9iAS and Portal (both Release 1) to: 1. develop pl/sql base applications. I make use of the local security tables (wwsec_person$ etc) to grant access to applications, content areas and folders etc. 2. a trigger that

  • Call ended - invalid phone number

    Skype keeps telling me I am entering an invalid phone number. I have tried several time without success. I have credit in my account that I cannot use. I am talking of a landline in Chile here not even a cell phone. The message "call ended - invalid

  • Getting an image to pop up on the cover page of a package

    Im using adobe acrobat 8 standard.  I have a picture as the backgroud of a page and i would like to be able to click on various parts of the picture and have other scaled down pictures pop up on that same page.  Can this be dont in acrobat 8 standard