Viewing 15 posts - 17,011 through 17,025 (of 18,926 total)
afternoon?? you luck bast@rd... it's 10H30 am here
.
HTH.
June 10, 2005 at 8:42 am
Nice avatar btw.. did you make it yourself?
June 10, 2005 at 8:33 am
I had my fun imagining some of you guys scratching your head on this one like I did.
Still it's nice to see how 2 different set based approach can have...
June 10, 2005 at 8:30 am
SELECT COUNT(Distinct O1.OrderID), COUNT(O2.ItemID)
FROM dbo.Orders O1
--inner join flushs orders with no item
INNER JOIN dbo.OrderItems O2 ON O1.OrderID = O2.OrderID
where order_filled_date IS NULL
--not sure, but you might need this
--group...
June 10, 2005 at 8:20 am
try count(CompetencyCode_ID) instead of count(*).
June 10, 2005 at 8:17 am
I thaught of that one too.. but he said he didn't want to have orders with no items (how can that be, that's another questions
June 10, 2005 at 8:14 am
BTW, the function is meant to only generate the items list. It cannot be modified to return the quantity (even if it could count 'em easily). That's why...
June 10, 2005 at 8:03 am
Select count(distinct OrderID) as Orders, count(*) as Items from dbo.Order_item
(assuming that both columns are non-nullable)
June 10, 2005 at 8:02 am
Try this modified select :
Select O.Name, O.id, count(*) as Total, dbo.ListTableColumns(O.id) from dbo.SysObjects O inner join dbo.SysColumns C on O.id = C.id group by O.ID, O.Name
June 10, 2005 at 7:58 am
NP, you just have a better chance at an expert picking up your request if you put it there.
New thread started HERE
June 10, 2005 at 7:37 am
That's a nice idea, but if I remember correctly, his boss wants to see all the lines, and all the differences in all the columns (and leave the good ones...
June 10, 2005 at 7:36 am
Maybe there's an option to goto to next page (after completion) at the bottom section of that grouping (still referring to my access background).
June 10, 2005 at 7:35 am
well the straight solution, me thinks, is the create a linked server and go with insert select where not exists.
June 10, 2005 at 7:32 am
Viewing 15 posts - 17,011 through 17,025 (of 18,926 total)