adventureworks

Where to download AdventureWorks2008.msi?

你。 提交于 2020-02-03 04:50:07
问题 I'd like to install AdventureWorks2008 (I just install SQL Server 2008 R2 Express). Each time I download the recommended version from CodePlex, all I get is a AdventureWorks2008.mdf file. Not only I cannot attach the file from SQL Server Management Studio, but I cannot copy/paste the file directly into the the database. I've read in several places that I need to use AdventureWorks2008.msi , but I cannot find where to download it. I just cannot figure out how to install AdventureWorks2008

Permissions error when attaching a database: “Cannot access the specified path”

不羁岁月 提交于 2020-01-02 01:01:06
问题 I am running SQL Server 2012 Enterprise Edition. I have downloaded the AdventureWorks 2012 OLTP data files (both .mdf and .ldf ). I saved them to the AW folder that I created in My Documents where I unzipped the file. I go to SQL Server Management Studio (SSMS) right-click on database, and click attach in the context menu. In the dialog I click find. The UI does not allow me to navigate to folder. I try typing the full path to the file, and then I get the following error: Cannot access the

SQL: total quantity and SUM

别说谁变了你拦得住时间么 提交于 2019-12-25 18:52:53
问题 I have a question. On the AdventureWorks2012 database, I have to write a query using the Purchasing.PurchaseOrderDetail table and list the total quanity purchased for each product during 2006 and label sum as TotatQtyPurchased. I also have to group by ProductID. Here is my work SELECT POD.ProductID SUM(*) TotalQtyPurchased FROM Purchasing.PurchaseOrderDetail POD WHERE Date = '2006' GROUP BY POD.ProductID But I keep getting an error message: Msg 102, Level 15, State 1, Line 4 Incorrect syntax

SQL subqueries errors

依然范特西╮ 提交于 2019-12-25 04:24:52
问题 Using the AdventureWorks2012 database, I have to change the query below to select the top 10% orders with CustomerId greater than 500 and sequence the orders by TotalDue in descending sequence. SELECT * FROM Sales.SalesOrderHeader h INNER JOIN Sales.SalesOrderDetail d ON d.SalesOrderId = h.SalesOrderId Here are two of my attempts at solving the problem, but both contain errors: Msg 156, Level 15, State 1, Line 9 Incorrect syntax near the keyword 'DESC'. Msg 156, Level 15, State 1, Line 12

What is the most straightforward way to retrieve data from a local SQL Server database?

梦想与她 提交于 2019-12-11 16:46:51
问题 I don't need/want any security measures (username/password, etc.) - I just want to create a simple example of retrieving data from the AdventureWorks "lite" database (AdventureWorksLT2012_Data.mdf), storing that data in a generic list. I have the following code to query an MS Access database. Would it be basically the same except for the connection string and query statement? public SQLServerPOCRepository() { using (var conn = new OleDbConnection( @"Provider=Microsoft.ACE.OLEDB.12.0;User ID

MDX How to calculate measure against dimension without displaying members in results

◇◆丶佛笑我妖孽 提交于 2019-12-11 11:14:18
问题 Could someone please help me with the below MDX problem: I got the dataset like the one below: With Set Range1 as {[Date].[Calendar].[Month].&[2008]&[1] :[Date].[Calendar].[Month].&[2008]&[12]} Set Range2 as {[Delivery Date].[Calendar].[Month].&[2008]&[1]: [Delivery Date].[Calendar].[Month].&[2008]&[12]} MEMBER measures.A as [Measures].[Internet Order Count] + [Measures].[Reseller Order Count] select {[Measures].[Internet Order Count],A} on columns, non empty( [Sales Territory].[Sales

Permissions error when attaching a database: “Cannot access the specified path”

℡╲_俬逩灬. 提交于 2019-12-04 23:22:45
I am running SQL Server 2012 Enterprise Edition. I have downloaded the AdventureWorks 2012 OLTP data files (both .mdf and .ldf ). I saved them to the AW folder that I created in My Documents where I unzipped the file. I go to SQL Server Management Studio (SSMS) right-click on database, and click attach in the context menu. In the dialog I click find. The UI does not allow me to navigate to folder. I try typing the full path to the file, and then I get the following error: Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the