Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Building SQL to select fields
Message
De
12/01/2009 12:25:54
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
12/01/2009 12:23:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01372854
Message ID:
01372868
Vues:
21
Ok, now read my post on the laptop in the Chatter forum... :-D

>See? All you needed was for me to simply read it. Man, I'm good! ;)
>
>>UPDATE: Nevermind. Got it:
>>
>>lcFields = m.lcFields + IIF(m.ix > 1, ', ','') + FIELD(ix) + ' AS Fld'+TRANSFORM(ix)
>>
>>
>>
>>
>>
>>
>>
>>How do I get the lcFields variable in the code block below to go from this,
>>
>>Fld1, Fld2
>>
>>to this?
>>
>>FieldName1 AS Fld1, FieldName2 AS Fld2
>>
>>Code block:
>>
>>PROCEDURE CreateGenericReportCursor( m.AliasToConvert )
>>	lcTable = ALLTRIM(UPPER(JUSTSTEM(m.AliasToConvert)))
>>	lcFields = ''
>>	m.FieldCount = FCOUNT(m.AliasToConvert )
>>	FOR ix =1 TO FCOUNT(m.AliasToConvert )
>>		lcFields = m.lcFields + IIF(m.ix > 1, ', ','') + 'Fld'+TRANSFORM(ix)
>>	ENDFOR
>>	RunSQL = 'SELECT ' + lcFields + ' FROM ' + m.AliasToConvert
>>	RETURN 
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform