SQL query help with error
Posted on 2014-02-21
Ok I am investigating a query that someone developed for my company:
CAST(CAST(SUBSTRING(KeyField, 7, 10) AS BIGINT) AS varchar) AS OrderLineLink
The keyfield column has data such as....
0000230008 retult.... 8
0000290004 result.... 4
but now im getting data in the Keyfield such as...
This is obv causing a crash. If the conversion is not possible how can I get it to use null?