+ Reply to Thread
Results 1 to 3 of 3

Thread: Writing SQL query to import specific data to a pivot tableatabase

  1. #1
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Writing SQL query to import specific data to a pivot tableatabase

    Hi,

    Using either VBA code or the Excel functionality of Pivot Tables, how would I construct an SQL query to import data from a SQL server database into a pivot table, but filtering out certain items from one of the fields before it gets to the pivot table?

    For example what's the syntax of the Select statement to extract records where say the field named "Actioned" = "N"

    Usual TIA

  2. #2
    Registered User
    Join Date
    10-07-2008
    Location
    Wessex
    Posts
    55
    SELECT * FROM tablename WHERE Actioned = 'N'
    Have you tried constructing it via MSQuery?

  3. #3
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566
    Hi,

    Thanks for the prompt response.

    In Excel 2007 and the MSQuery option, where would I incorporate the Select statement?

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pivot table via external data sourse (cvs)
    By JoannaP. in forum Excel Worksheet Functions
    Replies: 5
    Last Post: 09-17-2008, 01:53 PM
  2. Replies: 1
    Last Post: 09-16-2008, 04:11 PM
  3. Import external data problem
    By loughery in forum Excel General
    Replies: 4
    Last Post: 09-08-2008, 09:05 AM
  4. Query to Get specific data
    By gelandl in forum Excel Programming
    Replies: 0
    Last Post: 09-01-2008, 09:34 AM
  5. Rotate and import data into SQL
    By dslaby in forum Excel Programming
    Replies: 1
    Last Post: 09-25-2006, 10:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0