Why does SQL Server truncate the data being stuffed into "@vt" without throwing some kind of error or warning The print statement puts "123456" into the output window.
Believe it or not .. our development team is actually trying to use this minor issue as justification for going with Oracle on this project, because they deem this as a data integrity issue and PL/SQL does throw an error. They would prefer to have an error thrown, instead of just silently truncating the data.
declare @vt varchar(6)
select @vt = '12345678'
print @vt
Is there a way that I can get T-SQL to throw an error or warning when this occurs I thought a UDT with a rule applied to it might do the trick, but that hasn't worked for some reason.
Or any other creative solutions that you can think of
Thank you, Mark