Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have problem, how can I choose certain data from my table.
My table is:
ID | Niveau 1 | Niveau 2 | Niveau 3 | Niveau 4 |
T10 | V20 | V02 | V96 | V52 |
T11 | V28 | J01 | V95 | V59 |
T12 | V25 | J02 | V56 | V29 |
T13 | J00 | V69 | V65 | V38 |
T14 | V29 | V36 | V51 | V81 |
T15 | V35 | V63 | J69 | V99 |
...
I want to choose only ID, where is J** in some Niveau.
Result table should be:
ID | Result |
T11 | J01 |
T12 | J02 |
T13 | J00 |
T15 | J69 |
How can I do this with some set analyse ?
Thank you for helping me.
Please find application as solution.
I would advice you can do this logic at script level.
Please find application as solution.
I would advice you can do this logic at script level.
Script level workaround:
Data:
LOAD * INLINE [
ID, Niveau 1, Niveau 2, Niveau 3, Niveau 4
T10, V20, V02, V96, V52
T11, V28, J01, V95, V59
T12, V25, J02, V56, V29
T13, J00, V69, V65, V38
T14, V29, V36, V51, V81
T15, V35, V63, J69, V99
];
Result:
LOAD ID, [Niveau 1] AS Result
Resident Data
Where Left([Niveau 1],1) = 'J' ;
LOAD ID, [Niveau 2] AS Result
Resident Data
Where Left([Niveau 2],1) = 'J' ;
LOAD ID, [Niveau 3] AS Result
Resident Data
Where Left([Niveau 3],1) = 'J' ;
LOAD ID, [Niveau 4] AS Result
Resident Data
Where Left([Niveau 4],1) = 'J' ;
Regards!
Rahul Pawar
Rahul, this is what i was talking.
we can go for compact code, 😛
Load *,
if(WildMatch([Niveau 1],'J*'),[Niveau 1])&if(WildMatch([Niveau 2],'J*'),[Niveau 2])&if(WildMatch([Niveau 3],'J*'),[Niveau 3])&if(WildMatch([Niveau 4],'J*'),[Niveau 4]) as [New Niveau];