Home How to check what column in INSERT do not have the correct data type?
Reply: 0

How to check what column in INSERT do not have the correct data type?

user531
1#
user531 Published in July 17, 2018, 7:25 pm

Imagine I have 200 columns in one INSERT statement, and I occasionally get an "Cannot convert" error for one of columns. Things is, I do not know which column causes this error.

Is there any way in T-SQL or mybatis to check WHICH column has the incorrect format? (I have just date, char, numeric). I can use ISNUMERIC, ISDATE for every column, but this is not so elegant.

I'm using mybatis in Java, so I cannot use any PreparedStatement or so.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320179 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO