|
|
-
Alejandro Mesa Answered 2 Years ago through Quizzes
All answers are correct so far. As Luts pointed out, the two customers missing from the resultset are due to the type of join we are using.
Here is another way to simulate the GROUP BY ALL, in this case:
SELECT
C.CustomerID,
C.Comp...
|
-
Alejandro Mesa Answered 2 Years ago through Quizzes
Nice one, Paul (SQLkiwi). It is fun seeing you translating the execution plan, but not a surprise, of the statement using GROUP BY ALL to a similar T-SQL query.
Take care,
Alejandro...
|
-
Alejandro Mesa Asked 2 Years ago through Quizzes
Look at the query given below which uses GROUP BY ALL which is a deprecated feature. Your task is to write a query that accomplishes the same functionality without using GROUP BY ALL....
|
-
Alejandro Mesa Asked 3 Years ago through Quizzes
This includes a number of questions around the usage and behavior of the CASE function....
|
-
Alejandro Mesa Commented 3 Years ago through Blogs
Hi Jacob,
Here is another approach to get same result. This approach uses the edge table from OPENXML function.
USE tempdb;
GO
CREATE TABLE #T (
id bigint NOT NULL PRIMARY KEY,
parentid bigint NULL,
nodetype int NOT NULL, -- 1 - element, 2 - ...
|
-
Alejandro Mesa Commented 3 Years ago through Blogs
Hi Jacob,
Here is another approach to get same result. This approach uses the edge table from OPENXML function.
USE tempdb;
GO
CREATE TABLE #T (
id bigint NOT NULL PRIMARY KEY,
parentid bigint NULL,
nodetype int NOT NULL, -- 1 - element, 2 - ...
|
-
Alejandro Mesa Commented 3 Years ago through Blogs
Hi Jacob,
This is really a good exercise. I wish we could have an xml method to return the same edge table as when we use OPENXML without "WITH", or the node table produced by the iterator "Table Valued Function - XML Reader " when you use the nodes...
|
-
Alejandro Mesa Commented 3 Years ago through Blogs
Hi Jacob,
This is really a good exercise. I wish we could have an xml method to return the same edge table as when we use OPENXML without "WITH", or the node table produced by the iterator "Table Valued Function - XML Reader " when you use the nodes...
|
-
Alejandro Mesa Created 4 Years ago through Puzzles
This challenge involves generating an organizational hierarchy and calculating the total orders created by each employee and his/her subordinates. It involves a number of challenges such as generating a resultset in the correct hierarchical form, calculati
|