Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I build that SQL
Message
 
À
16/03/2005 15:03:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Divers
Thread ID:
00996490
Message ID:
00996496
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
The other way that comes to my mind is to build a UDF, because If You have a code like this:

020101 SubSub1 previous SELECTs doesn't work:
SELECT PADR(MyFunc(MyTable.Code)) AS Decription .....


FUNCTION MyFunc(cString)
  LOCAL ret_val, seek_val
  ret_val = ""
  seek_val = ""
  DO WHILE .NOT. EMPTY(cString)
     seek_val = seek_val + LEFT(cString,2)
     cString = SUBSTR(cString,3)
     SEEK seek_val IN MyTable ORDER MyTableOrderByCode
     ret_val = ret_val + " " + ALLTRIM(Description)
  ENDDO
RETURN ALLTRIM(ret_val)
but it isn't so fast way
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform