DECLARE @vchString1 varchar(2),
@vchString2 varchar(10),
@iErrorval int
SELECT @vchString1 = 'abc'
SELECT @vchString1
SELECT @vchString2 = 'abcdefghij'
SELECT @vchString1 = @vchString2
SELECT @vchString1
CREATE TABLE #Test(vchString1 varchar(2),vchString2 varchar(10))
INSERT INTO #TestVALUES(@vchString2, @vchString2)
SELECT @@ERROR as [ErrorCode]
SELECT @@ERROR as [ErrorCode]
DROP TABLE #Test
Just so that you know what you are looking for - SQL truncates varchar's with out warning, but will warn you if you insert it into a table. Then I found out that the first time you reference @@ERROR it returns that code but the second...well you try it and see what happens *ARGH*!
My cousin James (Wakelin) visited me last night. Much chatching up and whiskey drinking ensued. He has recommended a book to all the open-minded people out there: The God Delusion. Haven't read it yet as I have too many others on my 'to be read' pile.
I think I shall start with either: A short history of nearly everything or By the River Piedra I sat Down and Wept.
No comments:
Post a Comment