Viewing 7 posts - 1 through 7 (of 7 total)
SELECT c.CustomerID, c.CompanyName, c.ContactName, c.City, c.Region, r.RegionDescription, o.MaxShippedDate
FROM Customers c
CROSS JOIN Region r
LEFT OUTER JOIN (
SELECT o.CustomerID, MAX(o.ShippedDate) AS MaxShippedDate
FROM Orders o
group by CustomerID
) o ON (o.CustomerID = c.CustomerID AND...
October 12, 2011 at 2:09 pm
I dont know if I get this right:
You said
"and this is my query2:
SELECT Orders.CustomerID, customers.companyname, max(Orders.ShippedDate)
FROM Orders INNER JOIN
Customers ON Orders.CustomerID = Customers.CustomerID
where Customers.Country='usa'
GROUP BY Orders.CustomerID, Customers.CompanyName
I want query 1...
October 12, 2011 at 12:50 pm
Good example of what I just told you:
http://riteshshah.wordpress.com/2009/03/03/use-of-rank-and-partition-by-clause-in-sql-server-2005/
October 12, 2011 at 11:48 am
what table is trans_Date coming from and what are the other columns in that table ?
Just isolate the trans_date and the other columns you need to group on...
October 12, 2011 at 11:47 am
have you ever tried using Rank By Partition() ?
October 12, 2011 at 11:33 am
They dont need to be sub-packages.
If they can run-in parallel, based on the condition of what ID it is.. Its more than enough..
Thanks a million!
February 3, 2010 at 3:03 pm
Thanks for your reply. I have developed a few packages earlier, but I am not able to follow the flow in your answer.
To summarize the whole scenarion:
I want...
February 3, 2010 at 2:57 pm
Viewing 7 posts - 1 through 7 (of 7 total)