Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community
ID | Division | Department | Centre | Group |
1111 | AAA | ZZZ | AZ | ZA |
2222 | YYY | BY | ||
3333 | BBB | XXX | ||
4444 | WWW | CW |
Condition to be used if Group is Blank:
if((len(trim(Group))<1 and len(trim(Centre))<1 and len(trim(Division))<1),Department,
if((len(trim(Group))<1 and len(trim(Centre))<1 and len(Division)>1),Division,
if((len(trim(Group))<1 and len(Centre)>1 and len(trim(Division))<1),Centre,Group))) AS Group
Is the Above Expression used is Correct.............................????
Above Expression Description:
if(Group is Blank and Centre is Blank and Division is Blank, Department,
if(Group is Blank and Centre is Blank and Division is NOT Blank, Division,
if(Group is Blank and Centre is NOT Blank and Division is Blank, Centre, Group)))
How to achieve this.
Regards
Aviral Nag
Hi,
Try like this
// Load the Excel files
Table1:
Load
ID,
Division,
Department,
Centre,
Group
From Table1:
Table2:
Load
ID,
Division,
Department,
Centre,
if((IsNull(Group) <> 0 And IsNull(Centre) <> 0 and IsNull(Division) <> 0),Department,
if((IsNull(Group) <> 0 And IsNull(Centre) <> 0 and IsNull(Division) = 0), Division,
if((IsNull(Group) <> 0 And IsNull(Centre) = 0 and IsNull(Division) = 0), Centre))) AS Group
Resident Table1;
Hope its help
Regards,
Iyyappan.