Re: WITH CUBE, Null and Empty string

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Is there a way to group these together so that nulls and empty strings are aggregated into the same row? <<

Go the the FROM clause and create a derived table with a COALESCE
(foobar, '') in it, then do the rest of the query. Remember that
GROUPING() detect the NULLs created by the grouping set family and not
the original ones in the data.

Can I assume you really did not use "Categories" as a column name?
That is both vague and non-scalars. You also need to add some
constraints to the table so you don't keep doing this over and over,
year after year. Or have to clean up amess when you fail to correct
the data just once :(
.



Relevant Pages

  • RE: Any good T-SQL quick reference recommended?
    ... The full syntax of the SELECT ... SELECT Clause ... Specifies the columns to be returned by the query. ... Specifies that duplicate rows can appear in the result set. ...
    (microsoft.public.sqlserver.programming)
  • RE: Xlocking with a select statement
    ... named query expression, order clause, update clause, lock option ... A result table or the underlying base tables are updateable if the query ... A lock can be requested for the ...
    (microsoft.public.sqlserver.programming)
  • Re: update query: still having problems
    ... "Michel Walsh" wrote: ... From the User Interface, in the toolbar, or the menu, when you edit a query, ... If this is what you want, fine, else, add a WHERE clause to limit ... SELECT Department.*, sheet1.* ...
    (microsoft.public.access.queries)
  • Re: update query: still having problems
    ... "Michel Walsh" wrote: ... you should find a button that allows you to change the query "type". ... If this is what you want, fine, else, add a WHERE clause to ... SELECT Department.*, sheet1.* ...
    (microsoft.public.access.queries)
  • Re: VB-ADO-SQL Server : SQL Server performs logins after some queries
    ... If you have some joins or WHERE clause in your statement, ... Also try to minimize selection of the records using WHERE ... Incase of actual action query, ... >> of queries and I've concluded that in case of an internet conection the ...
    (microsoft.public.vb.database.ado)