SQL query for longest match (multiple results)...SQL error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to use a SQL table to hold my routes and want to search for
longest match.
This works using this query.
select if((select count(*) from h323Routes where alias='%c'),(select hostIP
from h323Routes where alias='%c'),SUBSTR('%c',1,(LENGTH('%c')-1)))

Now...I want to try to add a second route to be used for failover.  When I
do this, I get "ERROR 1242 (21000): Subquery returns more than 1 row".   
I read on this and it seems to suggest using the keyword ANY, but I can't
find any examples of this in an IF statement.

Any help would be greatly appreciated.
Scott
-- 
View this message in context: http://old.nabble.com/SQL-query-for-longest-match-%28multiple-results%29...SQL-error-tp28262100p28262100.html
Sent from the GNU Gatekeeper Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux