Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:07:32+00:00 2026-06-18T12:07:32+00:00

I have a WinForms client application that executes the following SQL statement with parameters.

  • 0

I have a WinForms client application that executes the following SQL statement with parameters.

SELECT a.CaseNo, (c.Claimant + ' -v- ' + c.Defendant) AS CaseName, 
       a.Allocation - ISNULL(LAG(a.Allocation) 
       OVER (PARTITION BY a.CaseNo, a.FeeEarner ORDER BY a.AllocID), 0) AS Billing, a.AllocID 
FROM tblAllocations AS a INNER JOIN tblCases AS c ON a.CaseNo = c.CaseNo
WHERE a.CaseNo > 0 AND FeeEarner = @FeeEarner 
AND a.Date >= @StartDate 
AND a.Date <= @EndDate ORDER BY a.Date;

When I run this on my laptop where I do my development work, the query executes with no issues. The information returned is used to populate a datagrid within the client application. I am using SQL Server 2012 Express.

However, when the exact same client application is run at my customer’s premises the code returns an error. The majority of the error message is generated by my application which simply enables me to pinpoint where in the code the problem arises. However, at the end of the message where I append the system generated error, I get the following:

The parallel data warehouse (PDW) features are not enabled

I have never seen this message before and so am at a loss to determine what the problem is. I tried Google searches for this error message but have not found anything useful. My customer is using SQL Server 2008 R2 Express.

Is PDW a feature in SQL Express 2012 that isn’t in the 2008 R2 version?

What is it about my query that requires PDW?

Is it the use of PARTITION, because that is a keyword I had not used previously until this query which is causing the issues?

Without getting the customer to change their SQL version is there any way to address this problem e.g. by changing my SQL query, or enabling something in SQL?

Any help would be most appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:07:33+00:00Added an answer on June 18, 2026 at 12:07 pm

    The command LAG is only supported in SQL Server 2012.

    Though I’m surprised by the error if this is the problem.

    –Edit–

    To replicate your query without using LAG:

    This has basically been lifted from the article I mentioned;

    SELECT 
           a.CaseNo, 
           (c.Claimant + ' -v- ' + c.Defendant) AS CaseName, 
           a.Allocation - ISNULL((
               CASE 
                  WHEN N%2=1 
                  THEN MAX(CASE 
                       WHEN N%2=0 
                       THEN a.Allocation 
                       END) 
                  OVER (Partition BY N/2) 
                  ELSE MAX(CASE 
                       WHEN N%2=1 
                       THEN a.Allocation
                       END) 
                  OVER (Partition BY (N+1)/2) 
               END
           ), 0) AS Billing, 
           a.AllocID 
    FROM tblAllocations AS a
    LEFT JOIN (SELECT 
        Row_Number() OVER(ORDER BY b.Id) N,
        b.Id
      FROM tblAllocations as b) AS RowNum 
    ON RowNum.id=a.id 
    INNER JOIN tblCases AS c 
    ON a.CaseNo = c.CaseNo
    WHERE a.CaseNo > 0 
    AND FeeEarner = @FeeEarner 
    AND a.Date >= @StartDate 
    AND a.Date <= @EndDate 
    ORDER BY a.Date;
    

    This is demo’d in the following:

    SQL FIDDLE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a library assembly that outputs trace information, and a client winforms application
I have a WSE 3.0 based web service, and a WinForms client application that
I have a .net (2.0) winforms application that I need to upgrade on client
I have a have Winforms client that uses Web services on a IIS7 (W2008)
I have a Winforms application (written in C#) that is deployed on a network
I have a winforms application and I am trying to create a method that
I have the following situation: .net 3.5 WinForm client app accessing SQL Server 2008
I have a client service solution containing a Winforms client application and a WCF
Ok, I have developed this WinForms client, which interacts with a server (ASPX Application)
I have a WinForms application that is being used on tablet PC's with touch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.