Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Minor Mind Bender Help
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00575306
Message ID:
00575629
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform