Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by with substr() doesn't work?
Message
De
04/08/2011 12:34:45
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01520165
Message ID:
01520175
Vues:
43
Thanks Naomi


>>I pasted a working query from sql server into vfp of the form:
>>
>>select substring(myfield,1,2) as myfield_ from mytable group by substring(myfield,1,2)
>>
>>and changed it to:
>>select substr(myfield,1,2) as myfield_ from mytable group by substr(myfield,1,2) in vfp
>>
>>This results in in either 'sql colum "" is not found, or "group by clause is missing or invalid",
>>
>>But in vfp:
>>select substr(myfield,1,2) as myfield_ from mytable group by myfield_
>>works, but doesn't work in sql server (column not found error)
>>
>>I assume the SQL Server is 'ansi standard'? Is there a way to get VFP to behave like sql server? I tried all settings of set enginebehavior, but this didn't help.
>
>In VFP use GROUP BY 1
>
>SQL Server is ANSI standard.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform