Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm stuck. How do I turn a null value into something like "Unlabeled" or "Backlog" when I load it from a table in my script?
May be like this:
If(Len(Trim(FieldName)) = 0, 'Unlabeled', FieldName) as FieldName
Following link maybe helpful..
Huh. That didn't work... When I look at the data in SQL it doesn't actually say NULL. Maybe it's an empty string or something. I put your code into a Load statement but it didn't work. It looks like it should have though.
Can you check if there is any length here?
LOAD Len(Trim(FieldName)) as Check1
Ord(Len(Trim(FieldName)) as Check2
Check1 will help you identify if there are any characters which are not spaces, but still not available to view. Check2 will tell you what that character is actually. Once you have this information, can you let us know what all values show up for Check2 for those rows where FieldName is null?
Hi Nick,
If(Len(Trim(FieldName)) = ' ', 'Unlabeled', FieldName) as FieldName
here with in the single codes you can give space bar(just click ' ')most of the databases if they didn't mention default value then that is a Space bar only.
if it is not successful you can ask DB team only.
It is a space actually, not a null value. Your code still didn't work on it though... This is what I did
Left Keep
Table5:
Load
[Application ID] as ITMSNumber,
If(Len(Trim([ITMS Type])) = ' ', 'Unlabeled', [ITMS Type]) as [ITMS Type],
[Application Status];
Can you check with this
Ord(Len(Trim([ITMS Type])) as Check2
Hi Nick,
first thing first, like stalwar1 said, you need to take a look on to the type of data you'r looking at. If's a string saying NULL, then a simple replace is more than enough.
If data, actually is a null, you can use the ISNULL function.
Have a nice one!
It gave me a list with everything unlabeled and some numbers on the right side...