Implicit typecast observed in SQL Server 2000 -
in sql server 2k db table there varchar zipcode field happens output incorrect character length of zipcode when encouters numeric hyphenated zipcode. example, values such abc12-1234 emit correct length i.e. 10, when zipcode 21345-5 emits length 5 instead of 7. wonder how implicit uncalledfor typecasting avoided. ideas?
so complaint if does
insert yourtable(zipcode) values(21345-5) i.e omit quotes treated
insert yourtable(zipcode) values(21340) and want avoided , raise error because of cast int varchar
this strict behaviour isn't possible in version of sql server yet. though moderately highly voted request on connect site.
must zipcodes in locale contain - character? if enforce aspect check constraint otherwise you'll need exercise care in insert statements.
any inserts coming application should parameterised anyway correct type assume apply manual insert statements?
Comments
Post a Comment