Home
Analytics
new user - help please?
cmu
I have a computed column working fine in one query but when deployed to a different query it giving an error of null value can not be converted to string, any tips?
Find more posts tagged with
Comments
averma
Hi cmu,
What do you mean by deploying to a different query? Are you using the same query but with a different data in the database and the new values are null? Could you help me understand your questions a little better?
Ashwini
cmu
HI,
HAVE WORKED OUT SOME ERRORS BUT STRUGGLING WITH THIS ONE
I have a computed field which I want to give me the first 29 digits.
I have used the following syntax
row["FILE_NAME"]substr(1,29)
IT WILL NOT RUN BECAUSE SOME COLUMNS HAVE NULL VALUE HOW DO i AM AMEND SO THAT IF THE FILED HAS A NULL VALUE IT PUTS A PLACE HOLDER IN SUCH AS 'NO OUT FILE'
THANKS
Virgil Dodson
Hi cmu,
You should be able to check for null and put some other value in the field instead of performing the substring like below.
if (row["FILE_NAME"] == null) {
'NO OUT FILE';
} else {
row["FILE_NAME"].substr(1,29);
}