Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Minor Mind Bender Help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00575306
Message ID:
00575629
Vues:
22
I didn't quite get that. I slapped an extra ; after the UNION keyword but I got an error "Selects are not Union compatible". But at any rate, the client will be inputting the cPolicySymbol and cPolicyNumber every time, so I have to fit that into the WHERE clause as well (can't use HAVING since I don't get index optimization). I am playing with your idea to use UNION but haven't had any luck so far.....

Thanks.








>Not sure if the empty date format will work properly for you.
>
>A couple of issues.
>
>1. The SELECT in itself cannot guarantee that only one record will be returned for each of the unioned selects. That's a data driven issue, and you may have problems if multiple records have the same effective or expiration date.
>
>2. The goal is essentially a cross tab result set. Within the constraints of a one line SQL statement, I don't know how do that. The above query returns two rows, assuming that there is only one record for each of the min and max values. Will that work for you?
>
> Jay
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform