Create a dataset based on the result of another dataset?

  • I am working .Net program.

    Is it possible to create a dataset based on the result of another dataset?

    For example,

    Dataset_A= "select OrderBy, OrderDate, Sum(OrderAmount) as Amount from TableOrder group by OrderBy, OrderDate"

    Dataset_B ="select OrderBy, Sum(Amount) from Dataset_A group by OrderBy"

    User's selections from app will create Dataset_A but final report will based on Dataset_B (without OrderDate)

  • Yes, it's possible.

    Look for "subqueries" or "Common Table Expressions (CTE)"

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply