Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SELECT on Cursors
Message
 
 
À
10/09/2001 08:08:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00554562
Message ID:
00554589
Vues:
19
>Hi guys,
>Can you use SELECT SQL statement on cursors? I have a cursor called tempcur and I had this satement :
>
>SELECT tempcur.clerk, tempcur.rates;
> FROM tempcur;
> GROUP BY clerk;
> ORDER BY clerk;
> INTO DBF output/entries
>
>
>I get an error message "Invalid path or file name" when I run the form. What's wron with this? I would be glad of any help from you guys.

Others have posted answers to this. I just have one question about the use of GROUP BY in your statement. Why are you using it?

As Cetin posted, GROUP BY will implicitly do an ORDER BY. It needs to so it can roll up all the information based on clerk. However, because you don't have an aggregate function, it may mess up your results. If you have one entry per clerk, then the GROUP BY doesn't do anything for you except add extra processing time. If you have multiple entries per clerk, then you will get the rate for that clerk that is located last physically in the table (i.e. the rate record with the highest record number). You may or may not want that.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform