Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an SQL statement from strings
Message
 
À
10/03/1999 16:42:41
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00196099
Message ID:
00196105
Vues:
35
What you're doing should work. It looks like you may be missing a space between wcdet.wcnumber and INTO CURSOR... What happens when you run it? Do you get an error message? If so, what is it?

>HI!
>I am creating an SQL statement from strings and I don't know why this Select statement is not working. Code is as follows:
>
>* creates an SQL statement
>cTempSQL = 'select wcdet.wcnumber from wcdet' + ;
> ' INNER JOIN wceff ON wcdet.wcnumber = wceff.wcnumber' + ;
> ' INNER JOIN wcfreq ON wcdet.wcnumber = wcfreq.wcnumber WHERE ' + ;
> cTempeff + ' AND (' + cTempfreq + ')' + 'Group by wcdet.wcnumber' + ;
> 'INTO CURSOR c:\temp\result'
>
>* Executes select statement
>&cTempSQL
>
>I thought about using EVAL or EVALUATE but when I used it last time I ran into major problem. Eval or Evaluate for some reason didn't get rid of some object references and forms were not closing. I am hesitating to use these commands. Please advice if there is a better way of doing this.
>
>THANKS.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform