Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> need sql statement for complex address search

need sql statement for complex address search

From: sean nakasone <seannakasone_at_yahoo.com>
Date: Mon, 30 Jul 2007 08:30:11 -1000
Message-ID: <Pine.WNT.4.64.0707300829280.2044@pgsnakason.hawaiianelectric.net>


we have a database that stores addresses. the address number is stored in a field called MY_NUMBER. Now if the address has two numbers i.e. 12-345, then the 12 will be in a field called MY_PREFIX. I need to come up with 1 SQL statement (and it can't be PL/SQL) that will check if there's a hypen and if so, search in both the MY_PREFIX and MY_NUMBER fields. If there is no hyphen, then it should only search in the MY_NUMBER field. The reason it can't be a PL/SQL statement is because we are using an application that interfaces with oracle and that application will only accept one SQL statement and will not support PL/SQL. Received on Mon Jul 30 2007 - 13:30:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US