Help with Oracle searching

Results 1 to 2 of 2

Thread: Help with Oracle searching

  1. #1
    Join Date
    Dec 1969

    Default Help with Oracle searching

    Does anyone have a FAQ on how to search an Oracle database? I&#039;m finding that it behaves completely different than SQL Server 2000 and Access.<BR><BR>For example:<BR>1. Why doesn&#039;t "SELECT * FROM myDB WHERE myField LIKE &#039;%%&#039;" grab everything in the database?<BR>2. How do you do searches that ignore the case? i.e. "SELECT * FROM myDB WHERE myField LIKE &#039;%m%&#039;" doesn&#039;t match "Microsoft"

  2. #2
    Join Date
    Dec 1969

    Default Oracle

    This may help. I had an oracle database on my previous website. <BR>I am typing this stuff off of the top of my head, so please test, test, test.<BR>I think you need to write the first query with only one % like so:<BR>"SELECT * FROM myDB WHERE myField LIKE &#039;mary%&#039;"<BR>Two wildcards will pull too much data. One wild card like shown here will pull everything that begins with "mary"<BR><BR>I remember that Oracle is case sensitive. To remove that sensitivity, use Ucase or Lcase like so:<BR><BR>"SELECT * from myDB where ucase(myField) like ucase(&#039;mary%&#039;)"<BR> <BR>I hope this helps some.<BR><BR>Edward<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts