NYCPHP Meetup

NYPHP.org

[nycphp-talk] Querying a DB for Items with Names that Start with a Number

Daniel Convissor danielc at analysisandsolutions.com
Fri Mar 26 11:10:18 EST 2004


On Fri, Mar 26, 2004 at 10:56:23AM -0500, harvey wrote:
> 
> SELECT * FROM data WHERE is_numeric(name{0})

Depends on the DBMS you're using.  The SQL-99 standard says this is the 
syntax to use:
   select * from data where name similar to '[0-9]%';

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list