Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL-Select from VFP table
Message
From
08/01/2007 01:31:18
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01183357
Message ID:
01183360
Views:
19
Hi,
Can you give some sample data for the field


>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,
Regards N Mc Donald
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform