SQL server ISNUMERIC and checking for valid numeric tyopes

Posted by: SQL Server DBA, on 30 Jan 2012 | View original | Bookmarked: 0 time(s)

During a large ETL process from a staging table , UPDATE was creating an error on a CONVERT.Msg 245, Sev 16, State 1, Line 17 : Conversion failed when converting the nvarchar value '??u? ? ? ?AA???????????W?????????a??????K???????????????????1217' to data type int. [SQLSTATE 22018] It was necessary to create a step , where values could be checked , if they were a valid numeric type. ISNUMERIC returns 1 if its a valid numeric data type ( int, bigint, smallint, tinyint, decimal,numeric,money,smallmoney,float,real)SELECT...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 244 | Hits: 7

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD