+ Reply to Thread
Results 1 to 2 of 2

Power Pivot Help - SQL code working sort of?

  1. #1
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Power Pivot Help - SQL code working sort of?

    I apologize if this isn't the right section of the forum to put this topic....didn't see one for power pivot. I'm running into two different errors I was hoping for some help on.

    When I'm using PP and trying to bring down data from the SQL server I'm using the following code:

    SELECT BILLING.BILLING_SOLD_ACCNO, BILLING.BILLING_ORIG_ORDNO, BILLING.BILLING_ORIG_ORD_DATE, BILLING.BILLING_ORIG_OPR, BILLING_ORDER_ITEMS.BILLING_ITEM
    FROM BILLING INNER JOIN BILLING_ORDER_ITEMS ON BILLING.u2_id = BILLING_ORDER_ITEMS.u2_id
    WHERE (((BILLING.BILLING_ORIG_ORD_DATE)>=6/1/2016));

    My data comes in for the fields I want but it brings in the entire table instead of based on the date range that I'm trying to do. What am I doing wrong for setting the criteria I want that date range to be so it just brings in information starting at that date?

    My other question is I was also trying to do one other criteria on the data coming in but it keeps getting errors....in that the 3rd line looked like:
    WHERE (((BILLING.BILLING_ORIG_ORD_DATE)>=6/1/2016) AND ((BILLING.BILLING_ORIG_OPR) Not Like "WebSite"));

    It had the same two lines as above before the third line. For the field Billing_orig_opr I'm trying to not bring in any data that has WebSite in that field but it doesn't seem to like that and I've tried to put it in a few different ways.

    Can't figure what I'm doing wrong....Please help.


    thank you.

  2. #2
    Registered User
    Join Date
    11-11-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    92

    Re: Power Pivot Help - SQL code working sort of?

    Also posted this at:

    http://chandoo.org/forum/threads/pow...sort-of.29936/

+ 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. Replies: 0
    Last Post: 12-04-2015, 11:31 AM
  2. Date Sort in Pivot Table - Not working properly
    By claudiocustodio in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-12-2013, 04:30 PM
  3. [SOLVED] New to arrays-BubbleSort code(Working)-How do I edit to sort by 2nd column then 3rd?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-10-2013, 06:29 AM
  4. Power Pivot with multiple pivot charts using different pivot data
    By Paul-NYS in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-10-2013, 10:18 AM
  5. Power pivot is not downloading, or working
    By AB33 in forum Excel General
    Replies: 0
    Last Post: 08-06-2012, 12:47 PM
  6. Excel 2007 : custom sort in pivot table not working
    By bigh2odog in forum Excel General
    Replies: 0
    Last Post: 10-02-2009, 10:45 AM

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.6.0 RC 1