Does anyone have any scripts that will help convert Visual FoxPro 6.0 style WHERE clauses to MySQL...
For the most part the problems are converting VFP functions to the equivalent SQL. For example, Visual FoxPro has a function inlist() that is used like inlist(X,1,2,3) which converts to the MySQL query "X IN (1,2,3)". That's easy enough (relatively speaking) but VFP also has stuff like "EMPTY(X)" where any of Null, the Empty String (for Char), 0000-00-00 (or the VFP equivalent anyways for dates), False (for Boolean), 0 (for Numeric) are considered empty without needing to know the data type. So that starts getting a lot more complex since I'd need to check the data type of the field in the "right" table... to be able to convert it to something like (X is null OR X="") or (X is null OR x=0) etc... These are for customer "stored" queries... I've already manually converted "system" queries and I'm frustrated to the point of giving up and adding a column "untested" and let the end user figure it out but that seems bad from the standpoint of "lazy" and "poor customer experience". Thanks! Matt -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org