Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
i have two tables like these:
A | B |
---|---|
1 | Y |
2 | Y |
3 | N |
A |
---|
1 |
4 |
5 |
I'd like to have something like this:
A | B |
---|---|
1 | Y |
2 | Y |
3 | N |
4 | |
5 |
Can you help me please?
Table:
LOAD * INLINE [
A, B
1, Y
2, Y
3, N
];
Join (Table)
LOAD * INLINE [
A
4
5
];
Noconcatenate
Load A,
If(Isnull(B),'N',B) as B
resident Table;
Drop Table Table;
Hi,
Simple Load will create the result table. Try below code.
Table1:
LOAD * INLINE [
A, B
1, Y
2, Y
3, N
];
Table2:
LOAD * INLINE [
A
4
5
];
Use Join statement to join the table
Table:
LOAD * INLINE [
A, B
1, Y
2, Y
3, N
];
Join (Table)
LOAD * INLINE [
A
4
5
];
Values 4 and 5 in column A should have "N" in column B of table RESULT; Sorry, i didn't specify it
You can use below expression in Script or Chart to replace the Null values with N
if(isnull(B) or Len(B)=0,'N', B)
If you have no specific logic to specify N or Y and just want to give 'N' for the second table then
Table:
LOAD * INLINE [
A, B
1, Y
2, Y
3, N
];
Join (Table)
LOAD A, 'N' as B;
LOAD * INLINE [
A
4
5
];
In your answers you make:
LOAD * INLINE [
A, B
1, Y
2, Y
3, N
];
Join (Table)
LOAD * INLINE [
A
4
5
];
I can't delete value 1 from second table
i'have to make a full outer join from first and second table and then make a condition to set null values in column B (table of results) as "N"
Table:
LOAD * INLINE [
A, B
1, Y
2, Y
3, N
];
Join (Table)
LOAD * INLINE [
A
4
5
];
Noconcatenate
Load A,
If(Isnull(B),'N',B) as B
resident Table;
Drop Table Table;
I agree with Aar Kay Solution to fix in Script.