Home > Archive > MySQL ODBC Connector > January 2006 > Re: How can I isolate the integer part of a varchar field and use it









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: How can I isolate the integer part of a varchar field and use it
Michael Stassen

2006-01-25, 3:26 am

Nicolas Verhaeghe wrote:
> Because I am currently stuck with 3.23 I have just decided to create a
> "displacement" field to isolate the number.


That's the right way to go, regardless of version.

> Besides, some of these bikes
> escape from the rules, for instance instead of 600 for 600cc, you only
> have a mere "6", "1" stands for 1000.


It's bad enough having to pull the displacement out of the model number, but
when sometimes the number isn't really the displacement, what do you do? Well,
if you could extend the rules to cover the exceptions, you could extend the CASE
statement in my previous message to work, but this is really all the more reason
to put displacement in its own column.

> So all in all the displacement fields will work fine.


I think it's the only good solution.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com