Viewing 7 posts - 1 through 7 (of 7 total)
Thanks for enlightening me!
I kinda knew there was a stupid error on my part, but I just could not see it!
December 15, 2015 at 2:02 pm
DECLARE @dt DATE
-- YOU HAVE THREE OPTIONS HERE, DEPENDING UPON YOUR NEED:
--[1] SET @dt = '2010-09-23' ...
January 24, 2012 at 7:44 am
@@TRANCOUNT = 0 before and after the insert. So why is 2 being written to the table?
CREATE TABLE #temp (col1 int);
SELECT @@TRANCOUNT
BEGIN TRAN
ROLLBACK TRAN
SELECT @@TRANCOUNT
INSERT INTO #temp VALUES (@@TRANCOUNT);
SELECT...
June 21, 2011 at 12:31 pm
-- Create a tally table as taught by Jeff Moden
SELECT top 30 IDENTITY(int) ii into aux from sys.objects;
--------------------------------------------------------
SELECT col1, STUFF(col1, MIN(ii), 0, ' ')
FROM
(
SELECT col1, ii
FROM Table1
CROSS JOIN...
October 27, 2010 at 11:55 am
Jeff, with all due respect, I raced against the clock (5 min, 12 seconds) to complete this.
The crux of the challenge was to code a successful solution in the...
February 22, 2010 at 6:38 am
WITH bozo (i) as
(
select 1
union all select i+1 from bozo where i < 100
)
SELECT CASE when i % 3 = 0 and i % 5 = 0 then 'Fizzbuzz' when...
February 22, 2010 at 6:18 am
------ CREATE AND LOAD THE TABLE
create table aaatrash(id int, name varchar(20))
insert into aaatrash
select 1, 'apple'
union...
October 14, 2009 at 7:37 am
Viewing 7 posts - 1 through 7 (of 7 total)