Re: SQL for Pivot Result
- From: Arlyn_L <Arlyn_L@xxxxxxxxxxxxxxxx>
- Date: Fri, 22 Dec 2006 09:15:04 -0800
I believe that I am using the SQL MAX() with a single argument. Does the
CASE function not return a single argument? Each of the pivot fields has the
structure:
MAX(CASE WHEN ppv.type = 1 THEN pd.`value` END) AS addressee
which I think is a single argument.
Can it be that the VFPOLEDB Provider does not support CASE? Is there a list
of the allowable SQL for the VFPOLEDB Provider in the documentation? I have
not been able to find one.
Regards;
--
Arlyn_L
"Kevin Yu [MSFT]" wrote:
Hi Arlyn,.
I think the problem is that there are two MAX() functions in VFP: the
native function, which is the one you were using; and the SQL version,
which only takes one argument, which takes the maximum one in the column.
However, we cannot mix the VFP function into SQL.
In this case, you can use IIF instead of MAX here. For more information,
please check the following links:
http://www.tek-tips.com/viewthread.cfm?qid=861671&page=34
http://groups.google.com/group/comp.databases.xbase.fox/browse_thread/thread
/7befc4089dfc13a7/d2293548bb8544f3?lnk=st&q=%22Function+name+is+missing%22+f
oxpro+max&rnum=1#d2293548bb8544f3
http://groups.google.com/group/microsoft.public.fox.programmer.exchange/brow
se_thread/thread/25f0f3da3f1a53ea/ed96cfccdb5da6a8?lnk=st&q=%22Function+name
+is+missing%22+foxpro+max&rnum=2#ed96cfccdb5da6a8
Kevin Yu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
- Follow-Ups:
- Re: SQL for Pivot Result
- From: Kevin Yu [MSFT]
- Re: SQL for Pivot Result
- References:
- Re: SQL for Pivot Result
- From: Erland Sommarskog
- Re: SQL for Pivot Result
- From: Kevin Yu [MSFT]
- Re: SQL for Pivot Result
- Prev by Date: Re: SQL for Pivot Result
- Next by Date: Re: SQL for Pivot Result
- Previous by thread: Re: SQL for Pivot Result
- Next by thread: Re: SQL for Pivot Result
- Index(es):
Relevant Pages
|