Re: SQL for Pivot Result

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.)


.



Relevant Pages

  • RE: SQLCMD fails with login timeout expired.
    ... I understand tht you could connect to SQL Express properly by 2005 ... management tool but you cannot connect it via sqlcmd. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.tools)
  • Re: Passing parameters to stored procedure in ole db source
    ... I ended up putting the whole sql ... OK so this is SSIS. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.dts)
  • RE: Random NT Authority/Anonymous Login Errors - REALLY NEED HELP.
    ... and these ASP.NE application will use delegate to access the backend SQL ... you can check the eventlog on both the ASP.NET server and SQL ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Random NT Authority/Anonymous Login Errors - REALLY NEED HELP.
    ... and these ASP.NE application will use delegate to access the backend SQL ... you can check the eventlog on both the ASP.NET server and SQL ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Create new publication error
    ... This occurs when you have sql 2000 as publisher and 2005 ... This issue could occur if the user might be orphaned on the database you ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.replication)