Results 1 to 3 of 3
  1. #1
    mkallover is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    25

    Convert Access query to SQL Server query

    I've got an Access query that I've been using for a while and now I need to convert it to query an SQL Server DB. The problem is that I'm not very familiar with querying SQL servers so I'm at a loss as to how to convert. The query is:



    Code:
    TRANSFORM Count([Incident #])  [Count]
    SELECT [Assoc ID]
    FROM _smdba_.Incident
    WHERE [Open Date & Time] >'2010-12-31'
    GROUP BY [Assoc ID]
    PIVOT FORMAT([Open Date & Time], "ww", 2,2);
    Basically I want to query our incident database and return the number of incidents entered per associate on a weekly basis.

    I'd appreciate any help!

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

    if you're comfortable with Access SQL language but not SQL Server, you can link an Access database to the SQL server tables (use ODBC), and still use the access interface for querying it.

    grNG

  3. #3
    mkallover is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    25
    Yeah, that was my original plan but somehow the databases I'm trying to connect to don't support Access? I'm connecting to MAGIC and the developers have told me that they could create a view for me to connect to but whenever a change is made all of the views have to be created and it sounds like a big mess.

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

Similar Threads

  1. Convert Access 07 ADO code to SQL Server Express 2008
    By jrdnoland in forum Programming
    Replies: 8
    Last Post: 04-14-2010, 05:57 PM
  2. Sql server query to MS access query
    By blazixinfo@yahoo.com in forum Queries
    Replies: 0
    Last Post: 07-07-2009, 08:12 AM
  3. Convert query sql server for Access
    By webtony in forum Queries
    Replies: 0
    Last Post: 06-23-2009, 02:46 AM
  4. Convert Excel Macro to Access Query
    By crownedzero in forum Queries
    Replies: 1
    Last Post: 06-22-2009, 02:13 PM
  5. Replies: 0
    Last Post: 12-28-2008, 01:56 PM

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