From another conversation ...
"It reminds me of the handyman who caught a fish shaped like the letter L.
He, as it turns out, metacarple".
From another conversation ...
"It reminds me of the handyman who caught a fish shaped like the letter L.
He, as it turns out, metacarple".
This is the story of a man named Jed
A poor programmer that had been hit in the head
Then one day he did a query for a home
Did a top one and ended in Oklahom (a)
Thing is, this guy correctly figured that for every address on a street, there was only one possible number. But there could be more than one person registered at a household and he really only wants one of them. So he does
SELECT TOP 1 FROM Adresses WHERE Street = @a and Address = @b
Thing he forgot about was that there might possibly be a 123 Main Street in more than one city. In a different state.
They're still digging themselves out of the huge data corruption that this created.
Another SQL 2000 failure that seems to be OK anywhere else you try it.
-- Do something
GOGO
-- Do other stuff
Why that isn't an error in 2005 is a little curious
OK, Check this out. There are no errors in 2005 or 2008 even with that comma dangling off the end ...
CREATE TABLE [dbo].[AdvertiserSamCategory] (
[AdvertiserSAMID] [int] IDENTITY (1, 1) NOT NULL ,
[AdvertiserID] [INT] NOT NULL ,
[DomainLogin] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[SamCategoryID] [INT] NOT NULL ,
) ON [PRIMARY]
Here is the Microsoft way to figure the version and servicepack levels
Declare @V varchar(10), @sp varchar(5), @ed varchar(32), @nm varchar(32)
SELECT @v=convert(varchar(10),SERVERPROPERTY('productversion'))
,@sp=convert(varchar(5),SERVERPROPERTY ('productlevel'))
,@ed=convert(varchar(32),SERVERPROPERTY ('edition'))
,@nm=convert(varchar(32),@@servername)
Print 'SERVER:' + @nm
Print 'Version ' + @v
Print 'Level ' + @sp
Print @ed
My local 2008 server for example produces the following:
SERVER:WEB-TESTMULE
Version 10.0.1049. <====Note the extra period! Level CTP Developer Edition
This is the where clause I found when fixing a procedure one day...
FROM Rotation SR LEFT JOIN Break_Type BT ON BT.BT_ID = SR.BT_ID,
(select bandklocka, sp_id from Spot) S,
spot cg
where sr.rotationid = @CopyGroupRef
and sr.rotationid = cg.bandklocka
and s.bandklocka = sr.spotid
and sr.spotid = s.bandklocka
ORDER BY SR.STARTDATE
Now you may not know what a Bandklocka is, but I bet you can see what is off with its usage here.