Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Null as value

Hi all,

I'm using 'Null as Value' function in load script and applying it in all fields.  Is there an easy way to apply in all and exclude some?

Today I know that if you want some fields to be filled with null you just apply null as value on them, but for debugging purposes I would like to go excluding some of fields from this function. For example, take the load script:

Load

       *

drop field 'value' ;

Is there a way to do that?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can use NullAsNull to disable the NullAsValue for some fields:

//This enables NullAsValue for all fields except FieldA en FieldB.

NullAsValue *;

NullAsNull FieldA, FieldB;

// Load some data

MyTable

LOAD

     FieldA, FieldB, FieldC, FieldD

FROM

     MySource;

// Enable NullAsValue for all fields again

NullAsValue *;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

You can use NullAsNull to disable the NullAsValue for some fields:

//This enables NullAsValue for all fields except FieldA en FieldB.

NullAsValue *;

NullAsNull FieldA, FieldB;

// Load some data

MyTable

LOAD

     FieldA, FieldB, FieldC, FieldD

FROM

     MySource;

// Enable NullAsValue for all fields again

NullAsValue *;


talk is cheap, supply exceeds demand
Not applicable
Author

You can use NullAsValue & NullAsNull functions to manipulate the null values.

Anonymous
Not applicable
Author

Thanks Gysbert!

It helped a lot.

I've got another question: including lastworkdate in a chart
Any help would be appreciated.