Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Separate in three
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01044481
Message ID:
01044483
Views:
13
>In my database I have a field, with the following information: Peter Smith Smith; How I can make for it separates the field in three, so that the result is: field 1 Peter, field 2 Smith, field 3 Smith? my database has but of 1000 registers

If there're exactly 3 words in the field than
SELECT mytable
SCAN
  REPLACE ;
    field1 WITH GETWORDNUM(field123, 1), ;
    field2 WITH GETWORDNUM(field123, 2), ;
    field3 WITH GETWORDNUM(field123, 3), ;
ENDSCAN
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform