RE: [PHP-DB] Converting "text" fields to "integer" in queries with ODBC connection to an MS Access file

From: Date: Thu, 15 Nov 2001 13:57:24 +0000
Subject: RE: [PHP-DB] Converting "text" fields to "integer" in queries with ODBC connection to an MS Access file
Groups: php.db 
Request: Send a blank email to php-db+get-14361@lists.php.net to get a copy of this message
Some of the databases I work with would support this as 'between' on two text fields that are sortable alphabetically - I'd give that a try. -Lorenzo -----Original Message----- From: Christian Sandfeld Sent: Thu 11/15/2001 7:55 AM To: 'php-db@lists.php.net' Cc: Subject: [PHP-DB] Converting "text" fields to "integer" in queries with ODBC connection to an MS Access file Hi list, I wonder if anyone can help me out here. I'm pulling some data from an MS Access file using the ODBC driver provided with Windows NT 4.0 server (Option pack, and SP6a applied), and want to limit the result set with a where clause like this one: ... WHERE (PARTNUMBER > 370100000) AND (PARTNUMBER < 500000000) Now - the problem here is that the "PARTNUMBER" field is defined as a "text" field in the access file (even though it holds only numbers), and since I'm not the one maintaining the access base, I can't change that. So I tried converting the field to an INTEGER field using the CONVERT() function in my query. But this function is not supported by the ODBC driver. Does anyone know how I can convert the value of as "text" field to an "integer" type field so I can do >/< clauses in my query? Any help will be greatly appreciated. Brgds, Christian -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#14361) next »