|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Saturday, February 02, 2013 11:13 PM
Points: 82,
Visits: 76
|
|
What does the () signify with grouping sets of multiple elements?
An example on Microsoft.com, (http://technet.microsoft.com/en-us/library/bb522495(v=sql.105).aspx), read the following T-SQL code:
GROUP BY GROUPING SETS( (T.[Group], T.CountryRegionCode) ,(S.Name) ,(H.SalesPersonID,T.[Group]) ,(H.SalesPersonID) ,())
What does the last open parenthesis and its closing parenthesis "()" mean?
I think has the effect of a UNION of GROUP BY () nothing. But I don't know why you would want the results of a GROUP BY () that doesn't have any value.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 12:53 AM
Points: 150,
Visits: 1,026
|
|
|
|
|