Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one Department Field , and we are having some inactive department Id's in that Department field.....
Then how can we Remove those in active fields...
Thanks in Advance
madhu
Hi Madhu,
there's no much detail here to give advice on, rather than deleting it, don't load it!
Andy
Remove the complete records?
Try using a WHERE clause with Exists():
InactiveDept:
LOAD * INLINE [
Inactive
A
B
];
Dimension:
LOAD Department INLINE [
Department
A
B
C
D
E
]
WHERE NOT EXISTS(Inactive, Department);
DROP TABLE InactiveDept;
Hello!
You can do this
inner join (your_table_with_department_id)
load distinct
department_id
resident your_table_with_fact_where_you_can_find_active_department;
You want them to be removed in the script itself??
you can use a where clause in your table those are coming in, probably something like this:
Where Year(Max(ActivityDate)) >= 2
Group By DepartmentID;
This is saying that if a certain DepartmentID is not active for more than 2 years, drop it off.
For more help on the topic, you will need to give more details.
HTH
Best,
Sunny
Hi.
Status_Department:
1 = Active;
0 = Inactive.
Use something like this:
Department:
Load
DepartmentId
DepartmentName,
Status_Department
from <name table>
where
Status_Department = 1;
STORE [Department] INTO [..\<name table>.qvd] (qvd);
Hope this helps!