Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I have a code like this
TableA:
Load x,y,z
resident Q
Join
Load a,b,c
resident P
Now i have to give joint where condtion??? should I use brackets??
Thanks
if for joint where you mean condition on fields of Q and P
you need another resident load
AA:
NoConcatenate load *
Resident TableA
where x=1 and a=20 or b='cc';
DROP TableA;
Load a,b,c
resident P where "Field"= "Value";
try like this
TableA:
Load x,y,z
resident Q
Join
Load a,b,c
resident TableA
where x=1;
Regards
ASHFAQ
Try like this
Load * Inline [
Id,Amount
1,100
2,200
3,-100
4,-300
];
Final:
Load
If(Amount >= 0,Amount,0) as CreditAmount,
If(Amount <= 0, Amount,0) as DebitAmount
Resident TestData where Id = '1';
if for joint where you mean condition on fields of Q and P
you need another resident load
AA:
NoConcatenate load *
Resident TableA
where x=1 and a=20 or b='cc';
DROP TableA;
Kumar,
First of all, since there is no matching columns between Table P and Q, your join will result in a table will all 6 columns: x, y, z, a, b, c. This implicit outer join is equal to concatenate.
Regardless, you may specify the where condition as follow
Table A:
LOAD a, b, c
Resident P
WHERE a='condition A'
;
Join
LOAD x, y, z
Resident Q
WHERE x='condition X'
;
Good luck!
Thanks Friends
Hi,
Can you close this thread by selecting appropriate answers
regards
ASHFAQ