Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one please help me on below requirement.
I have two fields called PRODUCT1 and PRODUCT2 contains blank and null values.
I have convert these values into Null Text.
I have tried
NULLASVALUE "PRODUCT1","PRODUCT2";
SET NULLVALUE = 'NULL';
But i am not able to see NULL text in the above fields.
Please help me on this.
Thanks in advance.
something like this may be:
select product1
, case when product1 is null then 'NULL' else product1 end
from table;
Try this
Set Nullinterpret = 'NULL';
NULLASVALUE "PRODUCT1","PRODUCT2";
Set NullValue = 'NULL';
Hi,
Still i am not able to see NULL text in these fields.
Hi,
Try in script like this:
Table:
Load *,
if(Len(trim(Product1))>0, Product1,null()) as Product1,
if(Len(trim(Product2))>0, Product2,null()) as Product1
resident <>
Br,
KC
May be delete Double Quotes? and then try using below
NULLASVALUE PRODUCT1,PRODUCT2;
SET NULLVALUE = 'NULL';
Try this:
If(Product1 = ' ', 'NULL',
If(Product2 = '-','NULL'));
Try Like this:
T1:
Load
if(Len(trim(Product1))>0, Product1,'NULL') as Product1,
if(Len(trim(Product2))>0, Product2,'NULL') as Product2;
Sql select
p.product1,
p.product2
from product p;
Noconcatenate
T2:
Load *
resident T1
where Product1='NULL' and Product2 = 'NULL';
drop table T1;
Hi Bhavani,
You don't need to do anything in script, just go the expression tab and use the following expression:
If (Sum(Product1)=0,'NULL',
Num(Sum(Product1),'###'))
Please find the sample application for your reference. Hope this will work for you.
something like this may be:
select product1
, case when product1 is null then 'NULL' else product1 end
from table;
Or may be this:
select product1
, nvl(product1, ‘NULL’)
from table;