Viewing 15 posts - 166 through 180 (of 219 total)
matt32 (2/10/2010)
but you can create a sp instead when you want to use cte
... or you can create a view without OPTION clause and add OPTION to the SELECT statement...
February 10, 2010 at 2:24 am
john.arnott (2/2/2010)
When the HASHBYTES() function fails with the input truncation error, it does not return NULL, but rather doesn't return anything.
But usually SQL Server considers "nothing" as a NULL value.
Here...
February 2, 2010 at 2:37 pm
Hugo Kornelis (2/1/2010)
The HASHBYTES does apparently indeed have an (undocumented!!) limit of 8000 bytes on it's input string.
SET CAPTIOUS_MODE ON
To be fair, it is documented in BOL 2008 (http://msdn.microsoft.com/en-us/library/ms174415.aspx):
Remarks
Allowed input...
February 1, 2010 at 5:53 am
Hugo Kornelis (2/1/2010)
the result of the HASHBYTES algorithm now exceeds 8000 bytes
No, it doesn't 🙂 The SHA-1 algorithm always produces 160-bit output, here is the proof: http://en.wikipedia.org/wiki/SHA#Comparison_of_SHA_functions.
The warning is raised...
February 1, 2010 at 3:23 am
honza.mf (1/29/2010)
And what about the answer "Any number, 1" or better "Nonnegative number, 1".
Agreed 😎
January 29, 2010 at 1:41 am
darren.sunderland (1/29/2010)
In SQL 2000 I get 0,1 for the first run in a new window
Did you use Query Analyzer or SQL Server Management Studio?
January 29, 2010 at 1:17 am
stewartc-708166 (1/28/2010)
when a new query window is opened, a connection is made to the database, which returns a result (not visible)this item is reflected in the @@rowcount as 1
Not exactly....
January 29, 2010 at 1:00 am
Hugo Kornelis (1/27/2010)
the unneeded brackets around [name] (name is not on the list of reserved keywords, so no delimitation required)
Sometimes I use those unneeded brackets too, because SSMS highlights "name"...
January 27, 2010 at 7:18 am
Rune Bivrin (1/27/2010)
January 27, 2010 at 2:23 am
Nice example of set-based data processing.
I have a few minor notes here:
1)
SELECT @Client_ID = ISNULL(IDENT_CURRENT('NT_Client'),0) + 1
SELECT @OrderHeader_ID = ISNULL(IDENT_CURRENT('NT_OrderHeader'),0) + 1
Note the use of ISNULL - this allows you...
January 25, 2010 at 2:59 am
vk-kirov (1/23/2010)
CREATE DATABASE [TestDB] ON PRIMARY
( NAME = N'TestDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TestDB.mdf' ,
SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME...
January 23, 2010 at 6:10 pm
timfle (1/23/2010)
excerpt of text:
size
Is the initial size of the file.
When size is not supplied for the primary file, the Database Engine uses the size...
January 23, 2010 at 5:57 pm
timfle (1/22/2010)
does anyone read MS documentation?Obviously vk kirov doesn't
Of course I may have overlooked something. Could you please post a suitable link to BOL and explain my mistake? I'll be...
January 23, 2010 at 10:54 am
Tom Garth (1/22/2010)
I ran a simpleCREATE DATABASE mydb
...
Then I used the 2005 SSMS UI to create a 'New database'
...
Bravo, Tom!
Of course SSMS does not use the 'CREATE DATABASE xxx'...
January 22, 2010 at 9:14 am
CirquedeSQLeil (1/21/2010)
timfle (1/21/2010)
The answer is the same size as the model database. And the size of the model database is determined by the dba.
That would have been the best...
January 21, 2010 at 9:10 am
Viewing 15 posts - 166 through 180 (of 219 total)