Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query can not be optimized?
Message
 
To
02/10/2006 12:07:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01158559
Message ID:
01158588
Views:
26
>>>>Try
>>>>
>>>>select *
>>>>	from person p
>>>>		inner join referral r on p.cl_ref = r.cl_ref
>>>>			where p.cl_dob > (
>>>>					select GOMONTH(min(EVL(rr.re_date, {^9000-12-31}), -216))
>>>>						from referral rr
>>>>						where rr.cl_ref = p.cl_ref )
>>>
>>>That seems to fail on the min() function call, it's expecting 2 arguments...
>>>
>>>Thanks
>>>Kev
>>
>>No, MIN() in SQL SELECT is totaly different function. It gets minimum value of the expression and requires nly one parameter.
>
>Yes I'm aware of that but something tells me you won't be able to apply it as an argument for the gomonth function.

This can't be true. Sergey misplaced brckets!
<pre>
GOMONTH(min(EVL(rr.re_date, {^9000-12-31})), -216)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform