Viewing 15 posts - 316 through 330 (of 812 total)
What do you mean with "we can use print and exec commands in single query"?
August 27, 2014 at 2:19 am
I don't like qotd too long.
But, BOL states that with SERIALIZABLE isolation level:
Other transactions cannot insert new rows with key values that would fall in the range of keys read...
August 14, 2014 at 12:47 am
sp_rename leave unaltered the definition, (see sys.syscomments)
create procedure My_proc
as
select 1 as a
go
SELECT * FROM sys.syscomments
WHERE object_name(id) = 'My_proc'
go
exec sp_rename My_proc,Myproc
SELECT * FROM sys.syscomments
WHERE object_name(id) = 'Myproc'
After the rename the definition...
August 13, 2014 at 1:47 am
Mighty (8/7/2014)
Easy one, but just because I installed many SQL Servers that needed Kerberos Authentication.
+1
August 7, 2014 at 4:47 am
Wonderfull!!!
It, also, works with subquery:
SELECT * FROM (
SELECT MAX(object_id) AS ID,MAX(name) AS NAME FROM sys.objects
) AS o
But in this case it states a wrong type for column NAME(int,null)
August 6, 2014 at 1:47 am
I noticed it for columns, tables and functions, but I happily surprised for star!
Good!
😀
August 6, 2014 at 1:06 am
A little variation:
-- this runs
DECLARE @i int = 1, @j-2 int = 2;
SET @i += 2;
SELECT @j-2 * @i
GO
-- this raises error
DECLARE @i int = 1,...
August 5, 2014 at 6:12 am
Hugo, you always are the NUMBER ONE!
😀
WOW, another qotd with a special offer with "SUMMER POINTS"!
😀
August 5, 2014 at 1:03 am
I read question and answers many times because of high score.
I was searching for the swindle!
But it's only a straightforward basic question.
😀
August 4, 2014 at 1:22 am
type_desc is Latin1_General_CI_AS_KS_WS
So, also, in a "case sensitive" database type_desc LIKE '%cons%' returns data.
July 31, 2014 at 1:00 am
I'd like also a SPLIT/JOIN function as in VB. So, given a tab/cr limited string the function returns a table and viceversa.
PURGECHAR removes a list of chars from a string.
July 10, 2014 at 12:59 am
Thank you for question!
Theoretically, any query would return different value!
In practice, Only ORDER BY NEWID() works for us.
July 9, 2014 at 1:36 am
grzegorz.mozejko (6/16/2014)
grzegorz.mozejko (6/16/2014)
a small correction, when name of first index column is begining part of second index column (add comma):
...
June 16, 2014 at 3:21 am
Replace:
STUFF((SELECT ', ' + COLUMN_DATA_KEY_COLS.name
with:
STUFF((SELECT ', ' + COLUMN_DATA_KEY_COLS.name + ' ' +SUBSTRING('+-',INDEX_COLUMN_DATA_KEY_COLS.is_descending_key+1,1)
June 16, 2014 at 2:58 am
Viewing 15 posts - 316 through 330 (of 812 total)