What is the Difference between <blank> and <null>

Hi Peter,

I have a doubt related to Null and Blank.
When I am using these in external data selection,I am getting the same output.

Could you please explain in detail...

Thanks,
Jashua
 
Jashua,

Sorry for my late reply I have not been well.

What you get depends on the database and the SQL software you are using.
 
In the context of data selection I'm seeing Data Selection <Null> map to ' ' (that's a space) and <Blank> map to SPACE. For example when testing TQEDSP for blank or NULL in a custom table F5531ATQ with prefix TQ:

Where | EDI - Successfully Processed (F5531ATQ)(EDSP)[BC] | is equal to | <Blank>
Or | EDI - Successfully Processed (F5531ATQ)(EDSP)[BC] | is equal to | <Null>

Is generating this SQL in the debug log:

SELECT * FROM TESTDTA92/F5531ATQ WHERE ( ( TQEDSP = SPACE OR TQEDSP = ' ' ) ) ORDER BY TQYLNO ASC,TQLITM ASC

It seems to be expecting that NULL has been normalized to a space. I am not sure about the difference between SPACE and ' ', but when I want to reproduce a logged query that says SPACE, I put ' ' and it gets the same result so they seem functionally equivalent.

JDE 9.2 on IBM i 7.2, using DB2 for i.
 
Back
Top