Problems with bound parameters in oracle text queries

Executing the following query I get strange effects depending on the value I pass for the search string :str ...
With value "Med" everything works fine and I get the results I have expected.
But when passing "Tech" as value to the query, the result is ORA-20000 and DRG-50901 (Oracle Text error, syntax error in parser)
select * from (
SELECT /*+ FIRST_ROWS */ *
FROM SERVICE_CATEGORY sCat
WHERE (
CONTAINS ( sCat.SERVICE_CATEGORY_C , '<QUERY><textquery grammar="CONTEXT"><progression><seq>{'
|| :str || '}</seq><seq>'
|| :str || '%</seq><seq>%'
|| :str || '%</seq><seq>fuzzy({'
|| :str || '},1,100,WEIGHT)</seq></progression></textquery></QUERY>', 1 ) <> 0 AND
sCat.SERVICE_TYPE_C IS NULL AND sCat.SERVICE_SPECIALTY_C IS NULL )
ORDER BY score(1) DESC ) where rownum <= 20
When passing the search string "Tech" directly to the query without using bound paramters, everthing works fine:
select * from (
SELECT /*+ FIRST_ROWS */ *
FROM SERVICE_CATEGORY sCat
WHERE (
CONTAINS ( sCat.SERVICE_CATEGORY_C , '<QUERY><textquery grammar="CONTEXT"><progression><seq>{'
|| 'Tech' || '}</seq><seq>'
|| 'Tech' || '%</seq><seq>%'
|| 'Tech' || '%</seq><seq>fuzzy({'
|| 'Tech' || '},1,100,WEIGHT)</seq></progression></textquery></QUERY>', 1 ) <> 0 AND
sCat.SERVICE_TYPE_C IS NULL AND sCat.SERVICE_SPECIALTY_C IS NULL )
ORDER BY score(1) DESC ) where rownum <= 20
Also, when I use >0 instead of <>0 everthing works fine:
select * from (
SELECT /*+ FIRST_ROWS */ *
FROM SERVICE_CATEGORY sCat
WHERE (
CONTAINS ( sCat.SERVICE_CATEGORY_C , '<QUERY><textquery grammar="CONTEXT"><progression><seq>{'
|| 'Tech' || '}</seq><seq>'
|| 'Tech' || '%</seq><seq>%'
|| 'Tech' || '%</seq><seq>fuzzy({'
|| 'Tech' || '},1,100,WEIGHT)</seq></progression></textquery></QUERY>', 1 ) > 0 AND
sCat.SERVICE_TYPE_C IS NULL AND sCat.SERVICE_SPECIALTY_C IS NULL )
ORDER BY score(1) DESC ) where rownum <= 20
Does anybody have an explanation for the strange effect when using a bound parameter in combination with <> 0?

I don't know why your query using bind variables is giving you a problem but use of literal inside CONTAINS second argument is encouraged anyway over bind variables starting with 10gR2 (unless you are confident enough about the cost and selectivity of your queries to the extent that you can use SQL hint instead). The literal replacement feature introduced in release 9i caused a hard-parse if the literal value changed but starting with 10gR2, at least for CONTAINS, a hard-parse is avoided even if the literal value has changed as long as the cost and selectivity is similar to an existing cursor in the library cache (e.g. within 10%).
Faisal

Similar Messages

  • Problem with date format from Oracle DB

    Hi,
    I am facing a problem with date fields from Oracle DB sources. The date format of the field in DB table is 'Date base type is DATE and DDIC type is DATS'.
    I mapped the date fields to Date characters in BI. Now the data that comes to PSA is in weird format. It shows like -0.PR.09-A
    I have changing the field settings in DataSource  to internal and external and also i have tried mapping these date fields to text fields with out luck. All delivers the same format.
    I have also tried using conversion routines like, CONVERSION_EXIT_IDATE_INPUT to change format. It also delivers me the same old result.
    If anybody of you have any suggestions or if anybody have you experienced such probelms, Please share your experience with me.
    Thanks in advance.
    Regards
    Varada

    Thanks for all your reply. I can only the solutions creating view in database. I want some solution to be done in BI. I appreciate if some of you have idea in it.
    The issue again in detail
    I am facing an issue with date fields from oracle data. The data that is sent from Oracle is in the format is -0.AR.04-M. I am able to convert this date in BI with conversion routine in BI into format 04-MAR-0.
    The problem is,  I am getting data of length 10 (Output format) in the format -0.AR.04-M where the month is not in numericals. Since it is in text it is taking one character spacing more.
    I have tried in different ways to convert and increased the length in BI, the result is same. I am wondering if we can change the date format in database.
    I am in puzzle with the this date format. I have checked other Oracle DB connections data for date fields in BI, they get data in the format 20.081.031 which will allow to convert this in BI. Only from the system i am trying creating a problem.
    Regards
    Varada

  • Installation problem with Siebel8.0 on Oracle Enterprise Linux 4 system

    We are having installation problem with Siebel8.0 on Oracle Enterprise Linux 4 system.
    Using interface, when installation come up to “Installing Wizard” window where Gateway Name Server Configuration window should take place, everything just freeze up
    Using console, after installation we obtain following errors:
    Installing Siebel Enterprise Server. Please wait...
    unable to launch: "ksh export
    LD_LIBRARY_PATH=/siebel/gtwysrvr/lib;PATH=${PATH}:.;/root/istemp8058094162222/_bundledJRE_/bin/java
    -Dtemp.dir=/root -cp /siebel/gtwysrvr/bin/setup.jar run -args LANG=ENU
    MODE=LIVE MODEL_FILE=/siebel/gtwysrvr/admin/enterprise_console.scm" error code:
    "236"(SBL-STJ-00152)
    LD_LIBRARY_PATH=/siebel/siebsrvr/lib;PATH=${PATH}:.;/root/istemp8058094162222/_bundledJRE_/bin/java
    -Dtemp.dir=/root -cp /siebel/siebsrvr/bin/setup.jar run -args LANG=ENU
    REPEAT=FALSE MODE=LIVE MODEL_FILE=/siebel/siebsrvr/admin/siebel_server.scm"
    error code: "236"(SBL-STJ-00152)
    LD_LIBRARY_PATH=/siebel/siebsrvr/mgmtagent/lib;PATH=${PATH}:.;/root/istemp8058094162222/_bundledJRE_/bin/java
    -Dtemp.dir=/root -cp /siebel/siebsrvr/mgmtagent/bin/setup.jar run -args
    LANG=ENU MODE=LIVE
    MODEL_FILE=/siebel/siebsrvr/mgmtagent/admin/mgmtagent_ses.scm" error code:
    "236"(SBL-STJ-00152)
    Running command :
    ./ssincfgw -is:javaconsole -console -args LANG=ENU MODE=LIVE MODEL_FILE=/siebel/gtwysrvr/admin/enterprise_console.scm
    Infinite loop of following error pops out:
    An error occurred during wizard bean change notification:
    java.lang.NoClassDefFoundError
    at ConfigInitialize.execute(ConfigInitialize.java:21)
    at com.installshield.wizard.StandardWizardListener.execute(StandardWizardListener.java:123)
    Is there any clue how this error can be solved??
    Thanks in advance!!
    Gordon
    Message was edited by:
    user605023

    I'm facing the same error message while install Siebel 8.0 on OEL. But before I had this ksh problem, it complains about disc space first, and I actually has plenty of disk space under the directory (it needs only 0.7 G and I have 17G free). Anybody has encountered such problem before?
    /net/sdcnas05/vol/engfs01/v_sia/8.0SIA[20405|http://forums.oracle.com/forums/]/Release/Linux/Server/Siebel_Enterprise_Server
    -bash-3.00$ ./setuplinux -is:javaconsole -console
    Initializing InstallShield Wizard........
    Initializing InstallShield Wizard........
    Launching InstallShield Wizard........
    0% 25% 50% 75% 100%
    Welcome to the InstallShield Wizard for Siebel Enterprise Server
    The InstallShield Wizard will install Siebel Enterprise Server on your
    computer.
    To continue, choose Next.
    Siebel Enterprise Server
    Siebel Systems
    Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]
    Siebel Enterprise Server Install Location
    Please specify a directory or press Enter to accept the default directory.
    Directory Name: [siebel] /slot/ems1115/appmgr/20405
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    Please select the products you wish to install.
    [ ] 1 - Gateway Name Server
    [ ] 2 - Siebel Server
    [ ] 3 - Database Configuration Utilities
    [ ] 4 - EAI Connectors
    To select an item enter its number, or 0 when you are finished: [0]: 1
    [X] 1 - Gateway Name Server
    [ ] 2 - Siebel Server
    [ ] 3 - Database Configuration Utilities
    [ ] 4 - EAI Connectors
    To select an item enter its number, or 0 when you are finished: [0]: 2
    [X] 1 - Gateway Name Server
    [X] 2 - Siebel Server
    [ ] 3 - Database Configuration Utilities
    [ ] 4 - EAI Connectors
    To select an item enter its number, or 0 when you are finished: [0]:
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    Configuring uninstallers. Please wait...
    0% 25% 50% 75% 100%
    Choose the setup type that best suits your needs.
    [X] 1 - Typical
    [ ] 2 - Compact
    [ ] 3 - Custom
    To select an item enter its number, or 0 when you are finished: [0]
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    Please select the languages you wish to install.
    [X] 1 - enu - English (American)
    [ ] 2 - fin - Finnish
    [ ] 3 - kor - Korean
    [ ] 4 - cht - Chinese (Traditional)
    [ ] 5 - ita - Italian (Standard)
    [ ] 6 - esn - Spanish (Modern)
    [ ] 7 - deu - German (Standard)
    [ ] 8 - chs - Chinese (Simplified)
    [ ] 9 - tha - Thai
    [ ] 10 - dan - Danish
    [ ] 11 - heb - Hebrew
    [ ] 12 - fra - French (Standard)
    [ ] 13 - nld - Dutch (Standard)
    [ ] 14 - ptb - Portuguese (Brazilian)
    [ ] 15 - csy - Czech
    [ ] 16 - jpn - Japanese
    [ ] 17 - ptg - Portuguese (Standard)
    [ ] 18 - ara - Arabic (Sa`udi)
    [ ] 19 - sve - Swedish
    To select an item enter its number, or 0 when you are finished: [0]
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    {color:#ff0000}*Drive "/slot/ems1115/appmgr/20405" does not have enough space to install the*
    selected configuration. Please free up "766446" KB on drive
    *"/slot/ems1115/appmgr/20405" before continuing.*{color}
    -bash-3.00$ pwd
    /slot/ems1115/appmgr/20405
    -bash-3.00$ df -h .
    Filesystem Size Used Avail Use% Mounted on
    sdc1002nap-vlan1:/vol/ems_39426_1115
    71G 55G 17G 77% /slot/ems1115

  • Problem with scrollable resultset of oracle

    I encountered problom like this:
    when I use
    s=createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    and getString of a resultset,I get the right data.
    However ,when I use
    s= createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    and getString of a ResultSet ,
    if the type of the field is Date,then get right data.
    if it is char or varchar2,then i get some thing like
    0x313233,
    all has been found in win2000&solaris
    with oracle 8.1.6
    thanks a lot!

    Hello,
    We've got the same problem.
    It comes from the National Character Set of Oracle Database.
    With WE8ISO8859P1, no problem with using this parameters.
    But with WE8ISO8859P9, we have some hexadecimal return.
    I don't know if it's works with another Character set, but with this, It doesn't work.
    We're trying to find a solution. Because change the character set is not one.
    Good luck.

  • Problem with Java 5 and Oracle 10g JDBC driver

    Hi All,
    Currently we upgrade our web application to Java 5 and Oracle 10.2 JDBC driver. And we encountered a bug, when the user entered the information through UI and data didn't store into database (Oracle 9i). The problem is that this bug is not happend so often maybe once a day and this did not happen before we upgraded to Java 5 and Oracle 10.2 JDBC driver. Does anyone encounter the same problem ? Is this Java 5 problem or Oracle JDBC driver problem ?
    Thanks,

    sounds like a database problem...
    Are you using a driver version that's supported for your database engine?
    What else did you change? We once ran into a major bug in our application that had for 5 years been masked by performance problems in our hardware and infrastructure.
    Once those were resolved the bug showed itself and caused tens of thousands of records to be erroneously inserted into our database every day.
    It's certainly NOT a problem with your JVM (if it's a decent one, like the Sun implementation).
    So it's either your database, your driver, your network (dropping packets???), or your application.
    The upgrade may just have exposed something that was already there.

  • JsCookMenu - Problem with display of Menu (Oracle ADF)

    I am using Oracle ADF with JSF components. The jsCookMenu displays the menu along with "x" representing images on the right and left side of the menu label. Please suggest me how to remove this icon from the menu display. Please find the code below.
    <t:jscookMenu layout="hbr" theme="ThemeOffice" styleLocation="/css/jscookmenu" >
    <t:navigationMenuItem id="nav_1" itemLabel=" Menu1 " >
    <t:navigationMenuItem id="nav_1_1" itemLabel="Menu1.1" > </t:navigationMenuItem>
    </t:navigationMenuItem>
    </t:jscookMenu>
    I am getting this problem with IE when the application starts. When I do ctrl+refresh, this issue doesnot occur. Also, with Firefox I am not getting any problem. I need to know how to fix this issue with IE when the application starts. Any suggestions on this would be of great help.

    User, please always tell us your jdev version.
    The interesting part is what you did not tell us.
    Kindly let me know as to why Iam not to replicate the issue in my earlier WLS.Please find my code means hte code has once run OK and now after you did some changes doesn't any longer. Querstion: what did you change, not oly to the code but to the environment.
    Timo

  • Problems with Drive Mapping using Oracle Drive

    It seems as though we are having some trouble with oracle drive. The install was a piece of cake, as was the configuration. The problem arises when at times we connect with the proper credentials, Oracle Drive logs the user in, but then the appropriate drive does not map. Nothing shows up under "My computer". The window will launch for the user to use Oracle Drive, but they get error messages including, "Cannot support long file names." (AKA, anything longer than 8 characters).
    Has anyone else come across these issues? Any ideas how to resolve. The issues we get with the long file names seem to only be when the drive doesn't properly map.
    Any thoughts would be helpful.
    Also, I have heard rumors of a Production version of Oracle Drive. Anyone have some news on that?

    We are very pleased to announce the Production Release 10.1.2.0 of Oracle Drive.
    You can download the software from here:
    http://www.oracle.com/technology/software/products/cs/index.html
    Note:
    - This version is production for English only. Other languages are Beta.
    - Oracle Drive 10.1.2.1 for ALL languages is expected soon.
    Find more information on Installation and Configuration as well as a Viewlet that shows Oracle Drive in Action here:
    http://www.oracle.com/technology/products/ias/portal/content_management_10gr2.html
    regards,
    Christian

  • GP and VC problem with input parameters

    Hi
    I have a problem with my GP dynamic approvals..
    I am trying to pass the parameters from one level to another level in GP using Visual COmposer screen with input and output parameters.
    When I see in NWA, I can see the ouput parameters of Screen1 is passed to input of Screen2 but I am not able to get the values in VC Screen.
    This scenario was working fine earlier.
    THe VC screen is same for all the approvals , I am doing dynamic approvals using predefined conditional callable  object and looping it.
    any suggestions..

    I have solved myself, I am sending html tags from one level to another level like <html></html> - these tags are not allowing VC screen to get all the parameters and they are blocked. I removed the tags, then I am able to get the parameters passed.

  • WebRowSet Problem  with database columns defined as TEXT??

    Hello,
    Can somebody help me on this subject. (http://forum.java.sun.com/thread.jspa?forumID=31&threadID=778586)
    I have the same problem with TEXT column when I try to populate the WebRowset.
    Thanks,
    Stephane

    OK,
    I change my postgresql driver for the lastest version (postgresql-8.2-506.jdbc3.jar) for JVM 1.5 and it's find...
    This driver support the javax.sql.
    St�phane
    Edited by: Borealis on Oct 15, 2007 12:43 PM

  • Problems with the installation of Oracle Role Manager

    Hello everyone;
    I have a problem with the deployment of Jboss 4.05GA; just can not load the Role Manager Administrative Console (http://localhost:8080/ormconsole)
    Probe load the Jboss and that if I load the console this APPSERVER (http://localhost:8080)
    Also probe load the Role Manager Web UI and I had no problems (http://localhost:8080/webui)
    Use the method of installation Install Software Only then can make the integration with the IOM.
    Any suggestions for solving this problem.
    Part of the Log:
    14:17:02,953 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- Incompletely deployed packages ---
    org.jboss.deployment.DeploymentInfo@40e1e159 { url=file:/C:/jboss-4.0.5.GA/serve
    r/default/deploy/server.ear }
    deployer: org.jboss.deployment.EARDeployer@873723
    status: Deployment FAILED reason: URL file:/C:/jboss-4.0.5.GA/server/default/t
    mp/deploy/tmp18940server.ear-contents/ormconsole-exp.war/ deployment failed
    state: FAILED
    watch: file:/C:/jboss-4.0.5.GA/server/default/deploy/server.ear
    altDD: null
    lastDeployed: 1228418189671
    lastModified: 1228418186515
    mbeans:
    --- MBeans waiting for other MBeans ---
    ObjectName: jboss.web.deployment:war=ormconsole.war,id=-1206236729
    State: FAILED
    Reason: org.jboss.deployment.DeploymentException: URL file:/C:/jboss-4.0.5.GA/
    server/default/tmp/deploy/tmp18940server.ear-contents/ormconsole-exp.war/ deploy
    ment failed
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: jboss.web.deployment:war=ormconsole.war,id=-1206236729
    State: FAILED
    Reason: org.jboss.deployment.DeploymentException: URL file:/C:/jboss-4.0.5.GA/
    server/default/tmp/deploy/tmp18940server.ear-contents/ormconsole-exp.war/ deploy
    ment failed
    14:17:03,281 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
    -8080
    14:17:03,718 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
    14:17:03,781 INFO [JkMain] Jk running ID=0 time=0/94 config=null
    14:17:04,015 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Bran
    ch_4_0 date=200610162339)] Started in 1m:35s:859ms
    Thank you

    HI JLK,
    i think i have solved the problem. Try to install the Oracle Role Manager with the installer and select the "Install Software and Configure" and install the "Standard Model" to the Database. Don't deploy the standard.car file.
    I hope i could help you.
    Thomas

  • Problem with connectionPool configuration to Oracle

    Hi
    I am facing some problems with configuration of connectionPool with oracle.I am using J2EE app server 8.1.While configuring I am giving following details:
    Datasource Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Resource type: javax.sql.ConnectionPoolDataSource
    PoolSettings,Connection Validation and Transaction Isolations settings are default.
    In Prperties
    DataSourceName OracleConnectionPoolDataSource
    ImplicitCachingEnabled false
    NetworkProtocol tcp
    FastConnectionFailoverEnabled false
    LoginTimeout 0
    Password xxx
    URL jdbc:oracle:thin:@localhost:1521:orcl (orcl is database name)
    ConnectionCachingEnabled false
    User SYSTEM
    ExplicitCachingEnabled false
    PortNumber 0
    MaxStatements 0
    ojdbc14.jar is placed in Appserver/lib directory and absolute path of this jar is added in classpath suffix in AppServer setting.
    But when I ping the connection thru Appserver only , Iget following error
    "Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Access denied to execute this method : setConnectionCachingEnabled"
    I dont understand what is the problem.
    Please help me out....
    Thanks a lot in advance

    I got it,
    Remove everything else from the settings except url,user and password.Save and restart Appserver.Now it will work....

  • Stratosphere- Problem with Screen Capture and Group Text Reply

    I have a problem with the side button that locks/unlocks the phone.  I don't know why it happens but sometimes when I press the side button to lock the phone it takes a screen shot and send its to my Gallery under the folder ScreenCapture.  I can't figure out why it does this sometimes, and when i want to actually take a screen shot I cant. 
    Anyone know how exactly you can take a screen shot?
    Another question i have is with Group Texts.  Is there a way to reply all when I receive a text that was sent to multiple people or can I only reply to the sender?
    Hope someone can help thanks!

        Hello kfeatherstone! I can provide you with instructions for taking a screenshot:
    1. Press both the Power and Home buttons briefly.
    2. You should hear a “click” sound and the screen will say “Screen captured. Saved as image file
    In regards to your messaging, "reply to all" is not an available option. I hope this information helps!
    ChaunceyM_VZWSupport
    Follow us on twitter @VZWSupport

  • Problem with Creative Cloud and Arabic Text

    We are currently testing illustrator CC and would be moving from CS5 Middle Eastern Version
    We have installed CC using the lanuage setting English Arabic
    And we can add text to files in arabic so all good
    However if we open a file created in CS5 ME the arabic text displays as blocks. The font used is myriad pro
    Is there a way to correct this ?

    The best bet is to keep both and open the file in the appropriate version. With the changes in the text engine it will always be a problem.

  • Problem with Microsoft ODBC for Oracle Driver

    I tried to import table in MS Access with Microsoft ODBC for Oracle Driver, but a msg error appeared:
    "Reserved error (-7776); there is no message for this error"
    I think the problem is about Microsoft Jet, but i'm not sure.
    Does anybody already had this problem?

    Given that you're using a Microsoft front-end and a Microsoft ODBC driver, I'm not sure how much help you'll find on this forum. You could try substituting the Oracle ODBC driver to see if that improves anything.
    Justin

  • Problem with date parameters

    Hi all. I have the problem with the below statement
    SELECT TO_DATE(:P_DATE,'DD/MM/YY') FROM DUAL
    it fetching me '4/10/2012'
    but I want 4/10/12 not as above.
    I given as DD/MM/YY not as 'DD/MM/YYYY' still it gives me 4/10/2012 why can any one explain ?
    Regards,
    Uraja

    Uvaraja wrote:
    Hi all. I have the problem with the below statement
    SELECT TO_DATE(:P_DATE,'DD/MM/YY') FROM DUAL
    it fetching me '4/10/2012'
    but I want 4/10/12 not as above.
    I given as DD/MM/YY not as 'DD/MM/YYYY' still it gives me 4/10/2012 why can any one explain ?
    Regards,
    UrajaBecause TO_DATE makes it a date. You then want to display it so there is an implicit TO_CHAR taking place
    which uses the default format for your system which looks like 'DD/MM/YYYY'.
    What are you actually trying to do?

Maybe you are looking for

  • Return type of Dialog

    I want Dialog to return my own class when it is closed. For example next dialog returns int, how to make dialog returning my own type? //Custom button text Object[] options = {"Yes, please", "No, thanks", "No eggs, no ham!"}; int n = JOptionPane.show

  • I believe Creative MP3 Players are the best! ... But i have a problem he

    Hi everybody!! I wish anyone can help me out here. Previously, there was someone else who has this problem with exactly the product which i have. I have this <EM>MuVo Slim</EM> which was bought nearly a year ago. A few months back, my MuVo Slim acted

  • TopN in Multiple Views

    Hi Everyone, I have a problem I have been trying to resolved for a while with no luck. I am trying to create a report where I am using a view selector to choose between 3 tables - cost per hour, cost per mile, cost per km. The problem I am having is

  • Using of SALERT_CREATE in PI mapping (RFC LOOKUPs)

    I have a stupid question on using SALERT_CREATE rfc in SAP PI mapping, I am using RFC lookups in the mapping, how can I use this SALERT_CREATE RFC, Do I need to Import from PI server? do I need Communication Channel for this? How can I use to send Al

  • Unable to connect to Internet

    I need help. I am trying to make a connection to the internet with my G4 running on OS 9.2 from my home. The phone company has come and told me that there is a fiber optic line that runs to the house and then an ethernet cable from the house to the j