Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with PostgreSQL Query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Help with PostgreSQL Query
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01429771
Message ID:
01429771
Vues:
96
Dear all
I am trying to execute the following query in postgresql, but keep getting errors ("error near group by"). Tried to run it in pgadmin's query tool, and got different errors ( like IIF not recognized ). Can anyone help me "translate" the sql from vfp to postgre?
Table name in postgre: weblog
Fields: agent C(4), function varchar(20), xmlstr text
lcStr = [select weblog.agent, ]+;
[sum(iif(weblog.function="GetCars" or "GETCARS"$weblog.xmlstr,1,0)) as RateRequests,]+;
[sum(iif(weblog.function="CarRes" or "CARRES"$weblog.xmlstr,1,0)) as Bookings ]+;
[from weblog order by weblog.agent group by weblog.agent]
=sqlexec( oConnection,  lcStr, "TempCursor" )
TIA
Jaime
Why do programs stop working correctly as soon as you leave the Fox?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform