none
Fetch xml query vs SQl query RRS feed

  • Question

  • hi friends,

    I am new to ssrs. And am having a doubt as follows,

    The sql queries with result,

    select CustomerID,QuotationID,ProductID,QuantityOrdered from Quote;

    select new_CustomerID,QuotationID,ProductID,QuantityDelivered from SalesOrder;

    My dataset query is as follows,

    select q.CustomerID,q.QuotationID,q.ProductID,q.QuantityOrdered,s.QuantityDelivered from Quote q, SalesOrder s where s.QuotationID=q.QuotationID and s.ProductID=q.ProductID;

    Quote Result:
    CustomerID QuotationID ProductID  QuantityOrdered
    ABC              Q1001           Pencil  1000
    ABC              Q1001           Eraser  800
    CDE              Q1002           Ruler  500
    FGH              Q1003           Pencil  400
       
    Order Result:   
    CustomerID QuotationID ProductID  QuantityDelivered
    ABC            Q1001            Pencil  1000
    ABC            Q1001            Eraser  0
    CDE            Q1002            Ruler  300
    FGH            Q1003            Pencil  200

    Dataset Result:
    CustomerID QuotationID ProductID  QuantityOrdered QuantityDelivered
    ABC                  Q1001       Pencil            1000      1000
    ABC                  Q1001       Eraser            800        0
    CDE                  Q1002       Ruler              500        300
    FGH                  Q1003       Pencil             400        200       Here I need to specify two conditions inorder to get the correct result in my dataset. It is possible in sql queries but in FETCH XML we can give only one condition isn't it?????????If it is possible in fetchxml then anyone please put my dataset query into FETCH XML query....thank you

    Thursday, July 26, 2012 7:03 AM

Answers