Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easy name flip-flop
Message
From
16/02/2003 10:43:57
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
 
 
To
15/02/2003 00:47:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00753637
Message ID:
00753880
Views:
24
I used the following code, see if it makes any sence

*-- Step 1.
=SQLEXEC(gnC, "SELECT name AS name1 FROM customer", "cTemp")

*-- Step 2.
SELECT cTemp.*, thisform.GetName(cTemp.name1) AS name FROM cTemp INTO CURSOR cTemp READWRITE

*-- Function GetName
LPARAMETERS tcName

tcName = ALLT(tcName)
lcLastName = allt(SUBS(tcName,1,at(",",tcName)-1))
lcFirstName = allt(SUBS(tcName,at(",",tcName)+1, 40))
tcName = allt(lcFirstName)+" "+allt(lcLastName)

tcName = PADr(tcName, 40," ")

RETURN tcName


Raz
Previous
Reply
Map
View

Click here to load this message in the networking platform