Help! problem about jstl sql with "LIKE?" in query

Hi All,
I have a problem about getting data by using "LIKE" in my sql statment.
here is my case:
<sql:query var="tmp">
SELECT ...... FROM ...
WHERE a LIKE ?
<sql:param value="%${param.a}%"/>
</sql:query>
Once I used "LIKE" keyword, the query failed to use this critica.
and couldn't find any match cases
thx or help
Micheal

besides, i found that:
this works:
"AND a.block LIKE '%' + 'a' + '%'"
but these don't work:
"AND a.block LIKE '%' + 'a' + '' + '%'"
or
"AND a.block LIKE '' + '%' + 'cp' + '%'"
or
"AND a.block LIKE '%' + 'cp' + '%' + ''"
it seems '' is the casue of error... so strange, anyone has idea?
micheal

Similar Messages

  • A problem about Ms Sql 7 - Oracle 8.1.5 ?

    hi
    I used OMWB to migrate MS sql 7 to Oracle 8.1.5, both of our env are on chinese character set,it worked well. Thank OMWB work team. The whole process of migration did't meet any problem. But I met a problem about character set,I don't see right content on CLOB column,all data in CLOB columns are like the following something :
    0F5C3A53A44E1A904575BE8FBF4F776302303052FD56388D01303100380006529F943052B065164E
    I maped text datatype of SQL to CLOB datatype,I can see the right data directly in SQL by select command,but I can't see the right data in SQL*PLUS.
    How can I do? Migration workbanch don't support the multi-bit char set such as chinese?
    null

    I already knew the solution of the problem,but I met another problem.
    I checked my sql 7 database again, I found large columns are ntext datatype. I changed the ntext to text and migrated data again. In SQL*PLUS ,I found the data of clob columns change to '????.?-?'. I know this is caused by NLS_LANG, my NLS_LANG=simplified chinese_china.zhs16gbk. How do i set my nls_lang to get the right data?
    null

  • Help me about built-in functions like regexp_substr,regexp_replace

    Hi everybody
    Can anyone help me to understand these functions like regexp_substr,regexp_replace ...
    Will be better if documantation include examples with different situations or it may be links
    Thx

    also - if you're just trying to learn regular expressions - which are generic and very much not specific to oracle, there are plenty of tutorial websites around the place that you'll find by googling.
    well worth learning, regardless of the programming language you're working with.

  • Get Oracle SID in PL/SQL with out a query

    Hi,
    Is there any way where I can get ORACLE SID value in the PL/SQL layer with out actually querying v$database tables.
    I am looking for key word in PL/SQL which stores currect SID name, just like how keyword 'user' stores the current user who has logged in.
    Thanks
    Sree

    Hi,
    Is there any way where I can get ORACLE SID valuein
    the PL/SQL layer with out actually querying
    v$database tables.
    I am looking for key word in PL/SQL which stores
    currect SID name, just like how keyword 'user'stores
    the current user who has logged in.Subtle correction ...
    [url=http://download-east.oracle.com/docs/cd/B19306_01
    /appdev.102/b14261/subprograms.htm#sthref1776]'user'
    is a built-in function provided by Oracle. Why don't you create your own function to perform the
    Select?
    I know I can create a function but, I dont want to read the table everytime it is called. Knowing that Database sid is going to be constant for next couple of years.
    The procedure in which I am going to use database sid is called for almost every transaction in the database. I am trying to avoid IO operation for a constant value. I cant declare a global constant as it is going to be different for each environment Dev, QA, Production etc..and we are looking to deploy same code for all the environments. We are anticipating to have multiple databases for production too.

  • Problem about BIEE Integration with LDAP

    Hello,
    I have a problem in OBIEE11.1.1.6
    I do BI EE 11g Security Integration with OPENLDAP follow below link,
    http://www.rittmanmead.com/2010/11/oracle-bi-ee-11g-security-integration-with-microsoft-active-directory/
    It works well using user that store in OPENLDAP ,
    now I want to realize this function,
    that user roles store in external db table,then get roles by init block,
    but I faced a problem, If I use session system variable 'WEBGROUPS' to get some value in db,when user login BIEE,it can get values of 'WEBGROUPS'
    but If I use session system variable 'ROLES' ,when user login BIEE,it can't get values of 'ROLES' that store in db,
    the value will always show 'BIConsume;Authenticated User',It is default value in OBIEE11.1.1.6,
    so I doubt way I can't user variable 'ROLES' to get value???
    init block lik follow,
    SQL: select T.att1,T.att2 FROM USER_ACCESS T
    T.att1 is for variable 'WEBGROUPS'
    T.att2 is for variable 'ROLES'
    the value of 'WEBGROUPS' is correct.
    but 'ROLES' not got the values that stored in db.
    anyone know???
    thank you in advance!

    VITAS wrote:
    that user roles store in external db table,then get roles by init block,
    but I faced a problem, If I use session system variable 'WEBGROUPS' to get some value in db,when user login BIEE,it can get values of 'WEBGROUPS'
    but If I use session system variable 'ROLES' ,when user login BIEE,it can't get values of 'ROLES' that store in db,
    the value will always show 'BIConsume;Authenticated User',It is default value in OBIEE11.1.1.6,
    so I doubt way I can't user variable 'ROLES' to get value???
    init block lik follow,
    Go to Enterprise Manager and create the ROLES named the same as the one you named in DB values. Now you should see them magically appear when you click on My account > Roles and Catalog Groups. :)
    SQL: select T.att1,T.att2 FROM USER_ACCESS T
    T.att1 is for variable 'WEBGROUPS'
    T.att2 is for variable 'ROLES'
    the value of 'WEBGROUPS' is correct.
    but 'ROLES' not got the values that stored in db.Hope you did you enable Row Wise Init here ?
    Let us know. Mark if helps.!
    Thanks,
    SVS

  • Help needed about JSTL

    We have tomcat server, in which we are running some jsp files( which consists some bean classes). We want to convert those bean classes into jsp tag libraries.Even we have installed jakarta tag libraries , but we are unable to run jstl files. Help wanted urgently.
    ThanX in advance.

    Your note has two problems in it: (1) Custom tag libraries of your own making, and (2) Running JSTL. I'd like to address the second of the two.
    I'm not sure what you downloaded from Jakarta. I'll assume that you're using JSTL 1.0.3 standard JSTL. (That's what I'm using.) The ZIP file I downloaded has a lib directory with 10 JARs in it. You'll need to put all 10 of them into your WEB-INF/lib directory for your app to use them.
    You don't have to put a <taglib> in your web.xml, and you don't need to dig out any TLD files. The TLD files you need are already inside the standard.jar that you downloaded with the JSTL. You should not be trying to re-create what is already correct.
    The pages that use the JSTL should have a tag like this near the top:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>The uri attribute value must match the value in the c.tld file located inside standard.jar exactly:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
      PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
      "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>1.0</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>c</short-name>
      <uri>http://java.sun.com/jstl/core</uri>
    <!-- etc. -->MOD

  • Problem about launching sql developer

    Hello,
    i've downloaded sql developer 1.5.5 with jdk1.6_11. When i try to launch the application file sqldeveloper.exe i have a screen which disappears. Has somebody already encounted this problem? I think it's linked to the jdk release but probably it's not the case. Can you help me please?
    Thank you in advance
    Arnaud

    Thx for your response. I have the same error with thus release. So i decide change the release and to use a previous release. I'm working in windows Vista. But i've seen that my problem is linked to jdk because i can't also launch elcipse.lol.the first time i have this problem. when i write java -version i have this error C:\Users\JEFF>java -version
    Error: could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg'
    i had jdk1.6_18 that i remplace with jdk1.6_11. I define the JAVA_HOME and the path. When i write
    C:\Users\JEFF>echo %PATH%
    C:\XEClient\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\syst
    em32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Pro
    gram Files\Acer\Empowering Technology\eDataSecurity\;C:\Program Files\Acer\Empow
    ering Technology\eDataSecurity\x86;C:\Program Files\Acer\Empowering Technology\e
    DataSecurity\x64;C:\Program Files\Java\jdk1.6.0_11\bin;
    So what is wrong? I don't want to install again jdk.
    Thank u

  • I have some problem about wifi sync with iOS5

    Hi~everbody~
    I have some problem with wifi sync, and still don't know how to resolve it. Please Help Me~
    First,I using Windows 7 64-bit, the latest iTunes 10.5, and iPod touch 4 with 5.0(9A334), and of course a WIFI AP in my room.
    Here is my major problem:
    When I setted up enable wifi sync in iTunes summary, the iTunes had identified my iPod and show at left side in iTunes,
    even when I unplug  my iPod touch 4 from my computer, the iTunes still shows there.
    But after one day when I came home, I opened the iTunes want do a wireless sync, but the iTunes did not found my machine.
    I have tried restart computer, restart WIFI AP, disable anti-virus software, close MSN, close teamviewer, and any software may caused some unstable network issue between iTunes and iPod touch 4, but when I done these whole things, the iTunes still not found my iPod.
    So I want to know do Wifi Sync needs any specific net port ? like 80 port or some port else?
    Wish there are somebody can help me fix this, very appreciate.
    BTW: Even iTunes did not found my iPod touch 4, but I can still using "Remote App" to control iTunes music play, so I really confuse why it just can't do wifi sync ?

    This error has got nothing to do with rmi.
    The StackOverflowError means the Java VM stack is filled up. The
    stack is used for keeping track of method calls. An easy way to
    produce a StackOverFlowErrer is the following code:
    class Test {
    public static void main(String[] args) {
    a();
    static void a() {
    a();
    So if you call method a() within the same method, the stack
    fills up quickly.

  • Help: Problem Inserting CLOB-data with ODBC

    Hello,
    I have searched this forum for my problem and found only one similar message, unfortunately without reply. I hope there are some wizards present here today who can help me.
    I use Perl and the ODBC driver for 8i (v8.1.5., WinNT) to insert and query data from a tabel with a CLOB. Queries go fine (although you have to increase the buffer size within Perl, but I have a problem to insert values into CLOBS.
    I get the message ORA-1704 shown below. Oracle/ODBC seems to think that i want to insert into a VARCHAR2(4000) instead of
    a CLOB.
    I have included my Perl test-script as well.
    Any suggestions are very welcome,
    Bart
    Error-message:
    ORA-01704 string literal too long
    Cause: The string literal is longer than 4000 characters.
    Action: Use a string literal of at most 4000 characters. Longer values
    may only be entered using bind variables.
    PERL test-script:
    #!perl
    # USAGE
    # perl clobtest size [bufsize]
    # Creates a string of approximately size*1000 bytes, consisting of a line with 'A',
    # followed by lines of at most 100 'o's, followed by a line with 'Z'.
    # bufsize is optional, if given, specifies the size of the ODBC buffer.
    # Default value is 10240
    # The string is loaded into a table field, then read from that field, and saved in
    # a file. The entire table is deleted on beforehand! so that there is only one
    # record in that table. If there are errors, error number and text are displayed on
    # the console.
    # See the globals below for username, password, host, table end column.
    use strict;
    use FileHandle;
    use Win32::ODBC;
    # GLOBALS
    # DATABASE
    my $ADMIN ='xpa';
    my $PWD ='manager';
    my $DBMC ='PO8i';
    my $table = 'TEST';
    my $column = 'OMSCHRIJVING';
    my $amount = $ARGV[0];
    my $newbufsize = $ARGV[1];
    my $bulk;
    sub connect_db {
    if (!$newbufsize) {
    $newbufsize = 10240;
    print "Connecting as... $ADMIN to $DBMC\n";
    my $dbh = new Win32::ODBC("dsn=$DBMC;UID=$ADMIN;PWD=$PWD");
    if (!$dbh) {
    print "Hm\n";
    die qq(Cannot open ODBC\n);
    $dbh->SetMaxBufSize($newbufsize);
    my $bufsize = $dbh->GetMaxBufSize();
    print "Bufsize = $bufsize\n";
    return $dbh;
    sub createbulk {
    $bulk = "A";
    my $bytes = 1000 * $amount;
    my $i;
    for ($i=0; $i<$bytes-4; $i++) {
    if ($i % 100 == 0) {
    $bulk .= "\n";
    else {
    $bulk .= "o";
    $bulk .= "\nZ\n";
    my $dbh = connect_db();
    createbulk();
    print "Deleting $table\n";
    $dbh->Sql("delete from $table");
    print "Inserting into $table -> $column\n";
    my $fail = $dbh->Sql("insert into $table ($column) VALUES (\'$bulk\')");
    if ($fail) {
    print "$dbh->{ErrNum}: $dbh->{ErrText}\n";
    exit;
    print "Querying from $table -> $column\n";
    $fail = $dbh->Sql("select OMSCHRIJVING from TEST");
    if ($fail) {
    print "$dbh->{ErrNum}: $dbh->{ErrText}\n";
    exit;
    my @result = ();
    while (defined $dbh->FetchRow()) {
    my $result = $dbh->Data();
    push @result, $result;
    print "Writing query result to file \"cltst$amount\"\n";
    open TST, ">cltst$amount";
    for my $line (@result) {
    print TST $line;
    close TST;

    Hi,
    We can't directly insert into a column
    which is a clob datatype.To insert data into
    the CLOB datatype column we have to write
    some PL/SQL progam using the package DBMS_LOB
    in oracle.
    Read Oracle documentation for more information on DBMS_LOB package.
    Hope this will help u.
    NEDU.
    null

  • Please help me about samples project with COM UI DI

    I run sample project
    C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI DI\VB.NET\AddColumn
    but i can't test becoz i don't know screen b1 matching with oForm.TypeEx = "65270"
    Please tell me about screen b1 for test this code

    I don't know the answer right away, but:
    - take a look into the FAQ in the Wiki (https://www.sdn.sap.com/irj/sdn/wiki?path=/display//b1/faq)
    - there go to "UI Forms"
    ...and find these links (mid-term we want of course more information directly available in the Wiki...):
    List of form IDs:
    /people/lutz.morrien3/blog/2004/10/01/all-sap-business-one-formtypes-at-one-look
    Update: https://weblogs.sdn.sap.com/cs/user/view/cs_msg/14059
    The hints in the update will help you to get the title of the form - and thus will give you a hint where to look for the form. For your convenience I have copied the "relevant code here:
    Dim Info As FormInfo = Application.ResourceData.GetFormInfo("65270")
    FormInfo.Title
    ...gives you the title of the form

  • Please help: problem configuring a SQL server datasource in Websphere.

    I am using Rational Developer 6 and its integrated testing server (websphere v6). When configuring a data source for SQL server, I did the following steps in admin console of the test server:
    1. Created a JDBC provider, using WebSphere embedded ConnectJDBC driver for MS SQL Server;
    2. Created a datasource under the previously created JDBC provider, filled in the server name, DB name and port number (1433 for SQL server);
    3. Created a J2C authentication alias that has the login info of SQL server;
    4. Assigned the created J2C alias to both component and container managed authentication alias;
    However, when I click "Test Connection", it always gets back to me with an error "java.lang.Exception: java.sql.SQLException: [IBM][SQLServer JDBC Driver]Error establishing socket. Connection refused: connectDSRA0010E: SQL State = 08001, Error Code = 0.".
    My ultimate goal is to configure a SQL server datasource so that I can configure Kodo to use this datasource.
    Can some one please help? Thanks in advance.

    Try this:
    http://www-1.ibm.com/support/docview.wss?uid=swg21210871
    I am yet to test this. I am going to download latest SP for SQL Server 2000 and install it. I hope it will do the magic.

  • Problem about locating file with similar filename "Info_*.dat"

    Dear all,
    I am a big problem in file locating and reading, please help and greatful to reply me with sample code.
    How can I locate and read in files with similar file name ( Info_*.dat ) one-by-one. For example , Info_AAA.dat, Info_BBB.dat, Info_CCC.dat. I want to read in Info_AAA.dat first, and then Info_BBB.dat , and lastly Info_CCC.dat, where AAA, BBB and CCC are random number. These files are stored in the same directory.
    How can I make use of * ? such as Info*.dat . Is that possible to use * with java ? Please show me a sample if possible.
    help Help..Urgent !
    Thanks a lot.
    MRW.

    That's easy with PathPattern class from JRegex:
    import java.util;
    import jregex.util.io.PathPattern;
      Enumeration files=new PathPattern("Info_*.dat").enumerateFiles();
      while(e.hasMoreElements()){
         File f=(File)e.nextElement();
         doWhatever(f);
    ...There are also any-char "?" and any-directory "**" wildcards.
    See http://jregex.sourceforge.net/gstarted.html#filesystem

  • Problem about SunPerformance Library with SunStudio9

    I use VMWare to build up an Solaris 10 environment. And I install the SunStudio9 IDE. Here I compile a simple .c file whose MakeFile has -xlic_lib=sunperf option to be compile with SunStudio9. Here is the error information list, please help me ,thanks a lot!
    QQ�F30520068
    email�[email protected]
    dmake -m serial -f "/export/home/wl/RG v1.5/exMK2"
    CC -g -o Sun-x86-Solaris/ex2 Sun-x86-Solaris/ex1.o -xlic_lib=sunperf -lm -lsocket -lnsl
    CC: warning: if you use ld�Cthe the option -xlic_lib=sunperf will pass to ld�Cor it will be ..
    /usr/ccs/bin/ld: illegal option -- x
    Use�Fld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:R:S:VY] file
    [-64]
    [-a]
    [-b]
    [-B direct]
    [-B dynamic | static]
    [-B eliminate]
    [-B group]
    [-B local]
    [-B reduce]
    [-B symbolic]
    [-c name]
    [-C]
    [-d y | n]
    [-D token,...]
    [-e epsym]
    [-f name]
    [-F name]
    [-G]
    [-h name]
    [-i]
    [-I name]
    [-l x]
    [-L path]
    [-m]
    [-M mapfile]
    [-N string]
    [-o outfile]
    [-p auditlib]
    [-P auditlib]
    [-Q y | n]
    [-r]
    [-R path]
    [-s]
    [-S supportlib]
    [-t]
    [-u symname]
    [-V]
    [-Y P,dirlist]
    [-z absexec]
    [-z allextract | defaultextract | weakextract]
    extract all member files, only members that resolve
    undefined tor tentative symbols, or allow extraction of
    archive members to resolvetweak references from
    archive files
    [-z combreloc]
    [-z nocompstrtab]
    [-z defs]
    [-z direct | nodirect]
    [-z endfiltee]
    [-z finiarray=function]
    [-z groupperm | nogroupperm]
    [-z ignore | record]
    [-z initarray=function]
    [-z initfirst]
    [-z interpose]
    [-z lazyload | nolazyload]
    [-z ld32=arg1,arg2,...]
    [-z ld64=arg1,arg2,...]
    [-z loadfltr]
    [-z muldefs]
    [-z nodefs]
    [-z nodefaultlib]
    [-z nodelete]
    [-z nodlopen]
    [-z nodump]
    [-z nopartial]
    [-z noversion]
    [-z now]
    [-z origin]
    [-z preinitarray=function]
    [-z redlocsym]
    [-z rescan]
    [-z text]
    [-z textoff]
    [-z textwarn]
    [-z verbose]
    "*** error code 1"
    "dmake: fatal error�F " "target `Sun-x86-Solaris/ex2' command failur"
    MakeFile failur
    time passed�F0 s

    I install the SunStudio9 IDEAre you sure its Studio *9* ?
    MakeFile has -xlic_lib=sunperf option to be compile with SunStudio9You should change it into -library=sunperf
    regards,
    __Fedor.

  • Dynamic PL/SQL with LIKE

    Hi everyone,
    I am having difficulty in creating a query that uses a LIKE keyword for an application in htmldb.
    eg:
    DECLARE
    q varchar2(4000);
    BEGIN
    q := 'SELECT * FROM MY_TABLE';
    IF :P15_MY_ITEM IS NOT NULL THEN
    q:= 'WHERE MY_COLUMN LIKE ' '& ' || :P15_MY_ITEM ||' ' ' ';
    END IF;
    return q;
    END;
    For some reason, i cannot parse the 'WHERE MY_COLUMN LIKE. . . . ' in the dynamic PL/SQL query that I am trying to create.
    Please advise how should I write the WHERE condition.
    Thanks!

    q:= 'WHERE MY_COLUMN LIKE ' '& ' || :P15_MY_ITEM ||' ' ' ';where will this query be executed?
    leave a space before the where.
    use % instead of &.
    try using bind variables instead of concatenating the value like that.

  • The problem about the interMedia with JMF

    I have done the following things:
    1. Add jmfordim.jar into my client computer's CLASSPATH
    2. Using JMFRegistry, Add "oracle.ord" into both my client's "protocol Prefix List" and "Content Prefix List" in PackageManager tab, commit on both.
    My computer is a client, and the Oracle 9i database and the intermedia are installed on another server with the service name "CAO". I use the JMStudio on my computer.
    But when I use the URL :"im://oci8/CAO/scott:tiger/SELECT t.aud.getcontent(), t.aud.getmimetype() FROM TAUD t WHERE n = 1 " and add into the JMStudio's OpenURL,
    it can't work correctly.
    Would you please tell me the reason? Thank you very much!

    Can you post the error message? Or print out a java stack dump with the exception text?
    There can be problems in different areas, without the error information, I cannot hope to tell you why it does not work. Perhaps you don't have the orcale JDBC driver in your path?
    Larry

Maybe you are looking for

  • Installing mac OS X leopard 10.5.6

    I'm currently running Mac OS x Tiger 10.4.11 and now trying to upgrade to leopard 10.5.6 from retail DVD. My problem is the install DVD will not load. It tries a few times to load the DVD and then just spits the DVD disk out of drive. looking for ass

  • Oracle SID Problem

    I have installed Oracle 10g on windows 2003 with sid ora10. I had to uninstall it and then reinstall it. When i choose the same sid it told me that already exists. Any feedback how this resolved. I have to have this sid due to application issues.

  • My HP 15-f039wm Notebook PC (ENERGY STAR) laptop runs really slow when the charger is plugged in.

    I've noticed this problem a lot lately, As soon as my laptop charger gets connected the speed of my laptop drops dramatically, the solution I have found for it is waiting till the battery is full charged then I take the charger out and restart the la

  • Flash in Captivate (code to change slides?)

    Good Morning Captivate Users! I was actually inquiring if there was a way to put in a command where when I press an existing flash project in captivate it will alter to the next slide.   I have tried putting in a click button but when I do, it will n

  • DTR Conflict while upgrading CRM ISA 5.0 to SP19 - Missing stylesheet

    Hi All, I am working on CRM ISA 5.0 upgrade from SP11 to SP19 in a new track. I have resolved all conflicts except one file stylesheet_ff.css. It was present in earlier SP version in this path - DCs/sap.com/crm/tc/web/appbase/_comp/src/packages/mimes