|
|
-
Razvan Socol Commented 4 Months ago through Just Learned
The GROUP BY ALL syntax is a non-ISO compliant syntax that is deprecated and will be removed from a future version of SQL Server. See [GROUP BY and ALL][1] in MSDN. The same result can be obtained by moving the WHERE clause in a SUM aggregate (which als...
|
-
Razvan Socol Commented 4 Months ago through Just Learned
The GROUP BY ALL syntax is a non-ISO compliant syntax that is deprecated and will be removed from a future version of SQL Server. See [GROUP BY and ALL][1] in MSDN. The same result can be obtained by moving the WHERE clause in a SUM aggregate (which als...
|
-
Razvan Socol Commented 5 Months ago through Just Learned
Books Online says: "Use `sp_attach_single_file_db` only on databases that were previously detached from the server by using an explicit `sp_detach_db` operation or on copied databases."
So you shouldn't use this as a recovery method; it only works when...
|
-
Razvan Socol Commented 5 Months ago through Just Learned
Books Online says: "Use `sp_attach_single_file_db` only on databases that were previously detached from the server by using an explicit `sp_detach_db` operation or on copied databases."
So you shouldn't use this as a recovery method; it only works when...
|
-
Razvan Socol incorrect 5 Months ago through Just Learned
By using sp_attach_single_file_db, we can bring suspect database into online, when LDF file is not available
sp_attach_single_file_db : Attaches a database having only one data file to the current server.
[code]
sp_attach_single_file_db [ @dbna...
|
-
Razvan Socol Commented 6 Months ago through Blogs
Try this:
CREATE TABLE t(x INT IDENTITY, y UNIQUEIDENTIFIER ROWGUIDCOL)
SELECT $IDENTITY, $ROWGUID FROM t
I'm not aware of any other pseudocolumn, except $IDENTITY and $ROWGUID.
$PARTITION looks more like a special keyword needed for a function ca...
|
-
Razvan Socol Commented 6 Months ago through Blogs
Try this:
CREATE TABLE t(x INT IDENTITY, y UNIQUEIDENTIFIER ROWGUIDCOL)
SELECT $IDENTITY, $ROWGUID FROM t
I'm not aware of any other pseudocolumn, except $IDENTITY and $ROWGUID.
$PARTITION looks more like a special keyword needed for a function ca...
|
-
Razvan Socol Commented 7 Months ago through Blogs
The behaviour is logical in most queries. I'm only puzzled by the following:
SELECT d FROM (SELECT 2 AS d UNION ALL SELECT 1) t ORDER BY (SELECT 1) /0
SELECT d FROM (SELECT 2 AS d UNION ALL SELECT 1) t ORDER BY 1/0
Why does the first one work a...
|
-
Razvan Socol Commented 7 Months ago through Blogs
The behaviour is logical in most queries. I'm only puzzled by the following:
SELECT d FROM (SELECT 2 AS d UNION ALL SELECT 1) t ORDER BY (SELECT 1) /0
SELECT d FROM (SELECT 2 AS d UNION ALL SELECT 1) t ORDER BY 1/0
Why does the first one work a...
|
-
Razvan Socol Commented 8 Months ago through Just Learned
I use something else: after typing "SELECT * FROM TableName", I select the query and press Ctrl+Shift+Q ("Design in query editor") then select OK....
|