Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object reference lost in SQL SELECT ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Divers
Thread ID:
01120146
Message ID:
01120235
Vues:
10
>It's much cleaner to use TEXTMERGE
>
>TEXT TO cSQLStatement TEXTMERGE NOSHOW PRETEXT 15
>SELECT column1, column2, "<<alltrim(object1.object2.property1)>>" as column3
>FROM cursor1
>INTO CURSOR cursor2 READWRITE
>ENDTEXT
Sergei,

my general case is that SQL statement could use both object properties as well as columns of the original cursor to create new columns in the destination cursor, for example:
cSQLStatement = SELECT column1, column2, alltrim(object1.object2.property1) as column3,;
 alltrim(cursor1.LastName + cursor1.FirstName) as FullName FROM cursor1 INTO CURSOR cursor2 READWRITE

&cSQLStatement
Although object properties are constant, and the TEST TO approach would work, the same approach could not be applied to reference other columns (cursor1.LastName + cursor1.FirstName) to create a new column. Therefore, it looks like I am stuck with the macro substitution. Therefore, the problem still remains: macro substitution seems to mess-up the object properties, or am I doing anything wrong?

Thanks again,
Igor.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform