Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building SQL to select fields
Message
From
12/01/2009 12:25:54
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
12/01/2009 12:23:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01372854
Message ID:
01372868
Views:
19
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 
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform