Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Question Converting an Access pivot query to SQL 2005


    Hi, I am new to table pivot and would like to know how to go about converting the following query in Access to SQL Server 2005:


    Code:
    TRANSFORM First(tbl_Proj_Budget.BUGDET_LINE_BURDENED_COST) AS FirstOfBUGDET_LINE_BURDENED_COST
    SELECT tbl_Proj_Budget.PROJ_ID, First(tbl_Proj_Budget.BUGDET_LINE_BURDENED_COST) AS [Total Of BUGDET_LINE_BURDENED_COST]
    FROM tbl_Proj_Budget
    GROUP BY tbl_Proj_Budget.PROJ_ID PIVOT tbl_Proj_Budget.RESOURCE_LIST_ALIAS;
    For instance, what does the 1st line mean?
    Code:
    TRANSFORM First(tbl_Proj_Budget.BUGDET_LINE_BURDENED_COST) AS FirstOfBUGDET_LINE_BURDENED_COST
    Thanks

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,046
    Hi,

    I think you can use the PIVOT statement (introduced in SQL 2005).

    SELECT [pivot column1] as C1
    [pivot col2] as C2
    ......
    FROM [data providing query]
    PIVOT [PIVOT statement] as MyPivotTable

    grNG

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Converting or using Access as a front end for Excel
    By jacko311 in forum Database Design
    Replies: 4
    Last Post: 11-07-2009, 12:19 PM
  2. SQL 2005 Unicode Query
    By ababkov in forum Queries
    Replies: 0
    Last Post: 11-01-2009, 03:18 AM
  3. Converting Access 2000 or 2003 to 2007
    By AnnaK in forum Access
    Replies: 1
    Last Post: 06-09-2009, 08:40 AM
  4. converting from Access 2003 to Access 2007
    By LawrenceLau in forum Access
    Replies: 6
    Last Post: 11-20-2008, 03:53 PM
  5. Converting Access Databases
    By awpic1964 in forum Import/Export Data
    Replies: 1
    Last Post: 08-04-2008, 06:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums