Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing string into a SQL statement
Message
De
22/12/2008 12:31:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/12/2008 12:16:17
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01369199
Message ID:
01369203
Vues:
7
>Trying to build SQL from a RowSource. I want to turn this:
>
>vNewVal = "Race.RaceCode, RaceDesc"
>
>Into this:
>
>"SELECT RaceCode AS F1, RaceDesc AS F2 FROM Race"
>
lcTable = JUSTSTEM(m.vNewVal)
vNewVal = SUBSTR(m.vNewVal, LEN(m.lcTable)+2)
lcFields = ''
for ix =1 to alines(arrF, m.vNewVal, 1, ',')
  lcFields = m.lcFields + iif(m.ix > 1, ',','') + ;
  	textmerge( '<<arrF[m.ix]>> as F<<m.ix>>' )
ENDFOR

SELECT &lcFields FROM (m.lcTable)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform