On Sun, Sep 30, 2001 at 11:07:37AM -0500, Gunter Leeb wrote: > Hi, > > Consider Name LIKE 'ABC%' finds all names that start with ABC. > > I am looking for the reverse: I have a string and I am looking for all the records >that have a name which is the BEGINNING of this > string. As an example: I have 'ABCDE' and I want rows contains 'ABCD' or 'ABC' >or just 'A' found. > > Is there a way to do this with SQL and MySQL in particular (and not send a query for >each substring)? > > Your help is appreciated, > > Thanks, > > Gunter Leeb > Director of Development > MachineGeneration Inc. > [EMAIL PROTECTED] > > Direct: (512) 266 2139 > Main: (512) 266 9580 > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
untested: SELECT * FROM <table> WHERE <column> LIKE A[<range>] -- "When you have eliminated the impossible, whatever remains, however improbable, must be the truth." --Sherlock Holmes _The Sign of Four_ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php