Not sure how to explain this, but will try my best and hopefully someone can assist. I have 2 SQL queries that query separate tables. The 2 queries have no relations (yet tied together) and is base of a material planning sort by date.
Here's example of my raw data and final output. The raw data shows from first query pulling (Want Date, Order#, and Qty). The 2nd query pull fields "Required Date and Job#".
With the above, if I sort by Want Date and Required Date, it aligns one after another. However, I need to align the rows with "Want Date" closes to or equal to the "Required Date".
Example, line 2 of my Raw Data has a "Want Date" of 1/15/2014, and closes "Required Date" is 1/20/2014. Since it is equal or greater than line 3, I want to align it with line 2. See Final output. Is this even doable?