Captain Drool says 'Merry Christmas!'
Seriously, a very Merry Christmas to all (read: both) my readers.
Poopsocks. You heard me.
Seriously, a very Merry Christmas to all (read: both) my readers.
Dear Everybody for whom I've ever held the door open (that felt they needed to put their hand on the door as they passed through it):
Here are the pictures I promised from last night's gathering.
darcs get http://inkedmn.homelinux.org:8000/repos/BitMail
Oh, crap, I still have a blog...
Gonna try posting some source code that I wrote for a friend today. It's really horrible and I'm embarrased to be posting it.
SET nocount ON
declare @foo varchar(10)
SET @foo = 'abc123'
CREATE TABLE #tmpLetters (
letter char)
INSERT INTO #tmpLetters (letter) values ('a')
INSERT INTO #tmpLetters (letter) values ('b')
INSERT INTO #tmpLetters (letter) values ('c')
INSERT INTO #tmpLetters (letter) values ('d')
INSERT INTO #tmpLetters (letter) values ('e')
INSERT INTO #tmpLetters (letter) values ('f')
INSERT INTO #tmpLetters (letter) values ('g')
INSERT INTO #tmpLetters (letter) values ('h')
INSERT INTO #tmpLetters (letter) values ('i')
INSERT INTO #tmpLetters (letter) values ('j')
INSERT INTO #tmpLetters (letter) values ('k')
INSERT INTO #tmpLetters (letter) values ('l')
INSERT INTO #tmpLetters (letter) values ('m')
INSERT INTO #tmpLetters (letter) values ('n')
INSERT INTO #tmpLetters (letter) values ('o')
INSERT INTO #tmpLetters (letter) values ('p')
INSERT INTO #tmpLetters (letter) values ('q')
INSERT INTO #tmpLetters (letter) values ('r')
INSERT INTO #tmpLetters (letter) values ('s')
INSERT INTO #tmpLetters (letter) values ('t')
INSERT INTO #tmpLetters (letter) values ('u')
INSERT INTO #tmpLetters (letter) values ('v')
INSERT INTO #tmpLetters (letter) values ('w')
INSERT INTO #tmpLetters (letter) values ('x')
INSERT INTO #tmpLetters (letter) values ('y')
INSERT INTO #tmpLetters (letter) values ('z')
declare lc cursor fast_forward
FOR
SELECT * FROM #tmpLetters
declare @letter char
declare @hasalpha bit
SET @hasalpha = 0
open lc
fetch next FROM lc INTO @letter
while @@fetch_status = 0
begin
IF (CHARINDEX(@letter,@foo) <> 0)
begin
SET @hasalpha = 1
end
fetch next FROM lc INTO @letter
end
close lc
deallocate lc
DROP TABLE #tmpLetters
IF @hasalpha = 1
begin
print 'Has Alpha Characters'
end
else
begin
print 'No Alpha Characters'
end
SET nocount off
declare @foo varchar(10)
set @foo = 'abc123'
IF(@foo LIKE '%[a-z]%')
BEGIN
print 'Has Alphas'
END
ELSE
BEGIN
print 'No Alphas'
END