Im getting this when running a query like this WITHOUT inserting in any table. in SSMS 2008.
select iav.*
from ITEM_ATTRIBUTE_VALUE iav
where iav.attribute_value != ''
and ISNUMERIC(iav.attribute_value) = 0
Why would it do this ?
For a start you will probably want "<>" as opposed to "!=" in SQL Server.
Also, ISNUMERIC will probably have to truncate iav.attribute_value to try and test if it is a number, probably to the length of maximum int which is 2147483647 (signed) - so to 10 characters long - hence the warning.
Edit:
If you look at the spec of ISNUMERIC you can see it looks for anything up to BIGINT.
BIGINT's maximum is 9223372036854775807, which is 19 characters long. So if your attribute_value is greater than 19 characters long it will be truncated in an attempt to test it is a valid number that is usable within SQL Server.
ISNUMERIC has a character limit of 308 integer chars and in some cases 309 chars for which it will return true if that is the case, after a certain amount of characters it will give the above mentioned error.
Best way to do the ISNUMERIC Check is to split your string into 300 char sections, validate each section and return the answer. This can be achieved via Function or just straight through code
DECLARE @incomingString VARCHAR(MAX) = '133450276206256972456897349683... Until 999999'
DECLARE @parts INT = 1
DECLARE @Count INT = 0
DECLARE @ISNUMERIC BIT = 1
WHILE(@parts * 300 < LEN(@incomingString))
SET @parts = @parts + 1
WHILE(@Count < @parts)
BEGIN
SET @Count = @Count + 1
IF(ISNUMERIC(SUBSTRING(@incomingString, (@Count * 300) - 299, 300)) = 0)
SET @ISNUMERIC = 0
END
SELECT CASE WHEN @ISNUMERIC = 0 THEN 'FAIL' ELSE 'SUCCESS' END