SQL Syntax for non case sensitive string search - wild card

Posted on 2006-05-05
Last Modified: 2008-02-01
Please advise,

I have an input box on an asp page where I want to take the value entered and search an Oracle database field , find instances of the input and return the associated record .

Thus far I have been successfull to the point that I can retrieve records only if the case of the input matches the string in the field.

sqlStr = "SELECT * FROM myTable where myField LIKE '%"& userInput &"%'"

is there a UCase() or strtoupper() that I can add in the SQL string like :
sqlStr = "SELECT * FROM myTable where UCASE(myField) LIKE '%"& UCASE(userInput) &"%'"

Thanks for your help.
Question by:Schrodenger
    1 Comment
    LVL 142

    Accepted Solution

    sqlStr = "SELECT * FROM myTable where UPPER(myField) LIKE '%"& UCASE(userInput) &"%'"

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Article by: Swadhin
    From the Oracle SQL Reference ( we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
    Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
    This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now