Viewing 15 posts - 241 through 255 (of 424 total)
This usually does the trick, placed at the top of a test script:
-- OPEN trans?
WHILE @@trancount > 0 COMMIT TRAN
GO
April 29, 2015 at 11:50 am
What is your specific question? You can edit the proc and add another parameter (with a default value) if you want it to be backward compatible.
April 29, 2015 at 10:33 am
I suspect you had a nested transaction. If you tried to test the script by stopping it, you may have created a nested transaction the second time you ran...
April 29, 2015 at 10:03 am
I have a C# cert and haven't touched the language in seven years. CLR functions for sql server are few and far between with no demand.
My recommendation would be...
April 28, 2015 at 8:50 am
ScottPletcher (4/23/2015)
April 23, 2015 at 12:00 pm
mistylove98 (4/23/2015)
April 23, 2015 at 10:55 am
I think we all struggle because there is no good answer to this problem.
There are three types of formats for data that serve different purposes:
Storage - using the built-in data...
April 23, 2015 at 10:44 am
Technically everything is stored as bits and bytes. Number storage is quite dense (efficient). I would expect credit card numbers to be stored in an encrypted varbinary column....
April 23, 2015 at 8:21 am
I had to read this to understand what a DevOp is:
http://en.wikipedia.org/wiki/DevOps
I've consulted at many corporate headquarters and found most of their databases designed at a kindergarten quality level. The...
April 23, 2015 at 7:35 am
You can't do SET-wise operations because theoretically SETs do not allow duplicates - duplicates will be ambiguous. Assuming your table is a HEAP, you must cursor through the rows...
April 22, 2015 at 8:28 am
declare
@StartDate date = '2015-01-01',
@EndDate date = '2015-01-05'
;
SELECT dateadd(DAY, x.rn, @StartDate)
FROM
( SELECT (ROW_NUMBER() OVER(ORDER by object_id))-1 AS rn FROM sys.objects) AS x
WHERE
x.rn <= DATEDIFF(DAY,@StartDate,@enddate )
;
April 21, 2015 at 1:32 pm
Itzik Ben-Gan saves the day once again!
I was bothered that the join clause for the right table of a left outer join was being ignored. Little did I know...
There...
April 20, 2015 at 11:59 am
Restoring your backup of "MyDatabase" will create a new database called "MyDatabaseCopy" with different file names if you follow the script below. You may need to highlight and execute...
April 17, 2015 at 8:47 am
The essence of the article, to me, seems to be about the power struggle between a DBA and Developer that happens every time a change is requested. I want...
April 10, 2015 at 12:09 pm
SELECT crdate, DATEDIFF(MINUTE,'19000101', crdate) / 15
FROM sysobjects
ORDER BY DATEDIFF(MINUTE,'19000101', crdate) / 15
WITH x AS
(
SELECT DATEDIFF(MINUTE,'19000101', crdate) / 15 as QuarterHour
FROM sysobjects
)
SELECT QuarterHour, COUNT(*)
FROM x
GROUP by QuarterHour
ORDER by QuarterHour
;
April 8, 2015 at 9:50 am
Viewing 15 posts - 241 through 255 (of 424 total)