All Forums Database
JustMe 76 posts Joined 03/07
24 Jun 2014
unable to cast object of type 'system.dbnull' to type 'system.string'

We have a query that we know will return nulls for a certain column.  However, in the result set, sometimes we see null and sometiems it returns <Error> in the column when the value should be null.   When I hover over the <Error> value, the below message is displayed.
 
unable to cast object of type 'system.dbnull' to type 'system.string'
 
I have not seen this before and would like some help in determining how this can be fixed.

ramesh_td 9 posts Joined 01/14
24 Jun 2014

Can you please give more details?

JustMe 76 posts Joined 03/07
25 Jun 2014

A user runs a query in SQL Assistant and expects null values in a certain column.  In the result set, the null indicator is displayed until row 501.... where it then displays '<Error>' as the value for that column.
I searched for a KA that addresses this issue.  The only one I found seemed to be 'internal' to Teradata... I could not view it.  So, I opened a question with the GSC.  It is a known defect in the  SQLA version that we have.  It is supposed to be fixed in SQLA version 14.10.0.08.
That same query, when exported to a file, returns the null indicator for all 40,000+ rows.

meta 22 posts Joined 11/09
03 Nov 2015

Looks like some defect in casting the Nulls to String for the next row after 'Maximum Number of answer rows to Display' setting in SQL Setting Options.

You must sign in to leave a comment.