<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: In oracle how to query an underscore _ as a literal underscore in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013110#M771736</link>
    <description>Frank,&lt;BR /&gt;sorry my answer didn't really help with your problem!&lt;BR /&gt;&lt;BR /&gt;I thought you would understand link syntax of the second link.&lt;BR /&gt;&lt;BR /&gt;You have to remove the &lt;BR /&gt; part before the .htm to get the proper page.&lt;BR /&gt;&lt;BR /&gt;Solution on the page:&lt;BR /&gt;"SELECT last_name &lt;BR /&gt;    FROM employees&lt;BR /&gt;    WHERE last_name LIKE '%A\_B%' ESCAPE '\';&lt;BR /&gt;"&lt;BR /&gt;</description>
    <pubDate>Thu, 09 Nov 2006 07:36:49 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2006-11-09T07:36:49Z</dc:date>
    <item>
      <title>In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013107#M771733</link>
      <description>Hi forum,&lt;BR /&gt;As you probably know in oracle there&lt;BR /&gt;are two wildcards % (compared to unix *) &lt;BR /&gt;and _ (compared to unix ?)&lt;BR /&gt;&lt;BR /&gt;Now if you have a number of tables which &lt;BR /&gt;contain in the name an underscore example:&lt;BR /&gt;B1_data&lt;BR /&gt;B2_data&lt;BR /&gt;...&lt;BR /&gt;Bn_data&lt;BR /&gt;&lt;BR /&gt;Then my query to retrieve all the table name&lt;BR /&gt;would normally be:&lt;BR /&gt;select * from user_tables where table_name like 'B_%'&lt;BR /&gt;&lt;BR /&gt;However this in Oracle retrieves all tables&lt;BR /&gt;starting with B and not B_ , as the _ underscore is seen a single character wildcard.&lt;BR /&gt;&lt;BR /&gt;So I get not only&lt;BR /&gt;B1_data&lt;BR /&gt;B2_data&lt;BR /&gt;...&lt;BR /&gt;Bn_data&lt;BR /&gt;but also the tables&lt;BR /&gt;Books_data&lt;BR /&gt;Building&lt;BR /&gt;Besijit  etc..&lt;BR /&gt;&lt;BR /&gt;How to get around this ?&lt;BR /&gt;Can I somehow quote the underscore , so it&lt;BR /&gt;is seen as a litteral and not as wildcard.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 05:37:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013107#M771733</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T05:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013108#M771734</link>
      <description>Frank,&lt;BR /&gt;does this help:&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Oracle_metadata#Use_of_underscore_in_table_and_column_names" target="_blank"&gt;http://en.wikipedia.org/wiki/Oracle_metadata#Use_of_underscore_in_table_and_column_names&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/conditions016.htm" target="_blank"&gt;http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/conditions016.htm&lt;/A&gt;</description>
      <pubDate>Thu, 09 Nov 2006 05:43:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013108#M771734</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-11-09T05:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013109#M771735</link>
      <description>Sorry Peter that didn't help,&lt;BR /&gt;the 2nd link didn't even work.&lt;BR /&gt;&lt;BR /&gt;However you inspired me to have a go at google&lt;BR /&gt;and I found this&lt;BR /&gt;&lt;A href="http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1159530743/0" target="_blank"&gt;http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1159530743/0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;tested it and it works.&lt;BR /&gt;So thanks</description>
      <pubDate>Thu, 09 Nov 2006 07:27:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013109#M771735</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T07:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013110#M771736</link>
      <description>Frank,&lt;BR /&gt;sorry my answer didn't really help with your problem!&lt;BR /&gt;&lt;BR /&gt;I thought you would understand link syntax of the second link.&lt;BR /&gt;&lt;BR /&gt;You have to remove the &lt;BR /&gt; part before the .htm to get the proper page.&lt;BR /&gt;&lt;BR /&gt;Solution on the page:&lt;BR /&gt;"SELECT last_name &lt;BR /&gt;    FROM employees&lt;BR /&gt;    WHERE last_name LIKE '%A\_B%' ESCAPE '\';&lt;BR /&gt;"&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 07:36:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013110#M771736</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-11-09T07:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013111#M771737</link>
      <description>Peter, I appreciated the first link because of its source. And it does very nicely point to a prossible solution if you just read carefully:&lt;BR /&gt;&lt;BR /&gt;"Use of underscore in table and column names.&lt;BR /&gt;&lt;BR /&gt;The underscore is a special SQL pattern match to a single character and should be escaped if you are in fact looking for an underscore character in the LIKE clause of a query.&lt;BR /&gt;&lt;BR /&gt;Just add the following after a LIKE statement:&lt;BR /&gt;&lt;BR /&gt;  ESCAPE _&lt;BR /&gt;And then each literal underscore should be a double underscore: __ "&lt;BR /&gt;&lt;BR /&gt;The other solution used ! as escape. Same thing.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Nov 2006 07:53:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013111#M771737</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-11-09T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013112#M771738</link>
      <description>...or where substr(object_name,1,1) = 'B' and substr(object_name,2,1) = '_'&lt;BR /&gt;&lt;BR /&gt;PS: see my reply to the dbua thread...&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;&lt;BR /&gt;Eric</description>
      <pubDate>Thu, 09 Nov 2006 09:11:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013112#M771738</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2006-11-09T09:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: In oracle how to query an underscore _ as a literal underscore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013113#M771739</link>
      <description>Thanks Eric , I keep that in mind.&lt;BR /&gt;&lt;BR /&gt;Hein, I did read the Escape _ from Wikipedia,&lt;BR /&gt;but that didn't mean anything to me at the time.&lt;BR /&gt;&lt;BR /&gt;Or I was just tool lazy and sought out a lazy hands-on solution,&lt;BR /&gt;not a test to crunch my grey cells over,&lt;BR /&gt;without knowing what I was doing.&lt;BR /&gt;&lt;BR /&gt;With hindsight having seen a concrete example&lt;BR /&gt;it makes sense :)&lt;BR /&gt;&lt;BR /&gt;Thanks all the same</description>
      <pubDate>Mon, 13 Nov 2006 01:43:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/in-oracle-how-to-query-an-underscore-as-a-literal-underscore/m-p/5013113#M771739</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-13T01:43:49Z</dc:date>
    </item>
  </channel>
</rss>

