You should be able to just populate a valid SQL Server 2012 product key.

Julie

]]>I’m upgrading from 2008 R2 to 20012 now, can I just use the populated product key on Step5, don’t need to change anything and just click next?

Thank you.

Regards,

JV

You would need to run the SQL Server ISO file and go to Maintenance > Edition Upgrade as outlined step by step here: http://www.mssqlgirl.com/upgrading-from-sql-server-2012-evaluation-edition.html

Hope this helps.

Julie

]]>http://stackoverflow.com/questions/12541355/how-to-use-partition-by-and-order-by-in-over-function

]]>I’m not sure why you are getting a syntax error – looking over it, I don’t see anything wrong except that:

with your 4th last line on the statement “FROM [@TLCC1] ps”, i.e. the main select statement should be referring to the CTE “ProductSales”, and all the columns should be referring to the ProductSales columns rather than @TLCC1.

Hope this helps.

Julie

I am having this error

Msg 102, Level 15, State 1, Line 20

Incorrect syntax near ‘order’.

This is my script

WITH ProductSales AS

(

— Get the total for each Product Model

SELECT

dp.ItemCode,

SUM(ssd.U_Sales) Sales

FROM [@TLCC1] ssd

INNER JOIN OITM dp

ON ssd.U_ItemCode = dp.ItemCode

GROUP BY

dp.ItemCode

)

– Calculate culmulative total and categorise it based on the percentage.

– Product Model that have high sales amount and make up the first 70%

– will be classified as A, the next 20% is B and the rest is C.

– Product Models in A generate more revenue.

SELECT

ps.U_ItemCode,

ps.U_Sales,

SUM(ps.U_Sales) OVER (ORDER BY ps.U_Sales DESC) AS CumulativeSales,

SUM(ps.U_Sales) OVER () AS TotalSales,

SUM(ps.U_Sales) OVER (ORDER BY ps.U_Sales DESC) / SUM(ps.U_Sales) OVER () AS CumulativePercentage,

CASE

WHEN SUM(ps.U_Sales) OVER (ORDER BY ps.U_Sales DESC) / SUM(ps.U_Sales) OVER () <= 0.7

THEN 'A'

WHEN SUM(ps.U_Sales) OVER (ORDER BY ps.U_Sales DESC) / SUM(ps.U_Sales) OVER () <= 0.9

THEN 'B'

ELSE 'C'

END AS Class

FROM [@TLCC1] ps

GROUP BY

ps.U_ItemCode,

ps.U_Sales;