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 ?
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.
Is it possible that the length of all fields returned, is greater then 8000 characters?
I think that might cause that error.
Try only returning the columns you need, or just a portion of a column, if it's greater then 8000 characters in length.
The main reason is one must be taking a temporary table(or something same) within the stored procedure and temporary table's datatype and the actual table's datatype must be having a mismatch in size.