Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL-Select from VFP table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL-Select from VFP table
Divers
Thread ID:
01183357
Message ID:
01183357
Vues:
87
Here's an unusual question (or at least this seems unusual to me):

I have a VFP table that contains (among other things) a character field containing the values 0-50 as well as the values A-Z.

In this client's data, A-Z represents quantifiable values less than zero, even though this field is a character field in the table.

Assuming the table name is "mytable" and the character field I am referring to is named "myfield", If I wanted to select all records where myfield contains a "value" less than "D" for example, how would I do so? I can't change the structure of the table, etc (tons of legacy data) and if I run a select statement such as:

Select * from mytable where myfield < "2"

then I obviously get records back where myfield = "12", "19", etc (since the data is stored as a character, "12" is seen as less than "2", etc). Using VAL() on the field in advance doesn't work as part of the SQL-Select statement.

Any suggestions on a quick solution? My hands are tied on how the data in this field is stored.

Thanks,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform