7 Replies Latest reply: Sep 23, 2014 8:50 AM by Ashfaq Mohammed

# how to give where condition in resident load

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

• ###### Re: how to give where condition in resident load

Load a,b,c

resident P where "Field"= "Value";

• ###### Re: how to give where condition in resident load

try like this

TableA:

Load x,y,z

resident Q

Join

Load a,b,c

resident TableA

where x=1;

Regards

ASHFAQ

• ###### Re: how to give where condition in resident load

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';

• ###### Re: how to give where condition in resident load

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;

• ###### Re: how to give where condition in resident load

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!

• ###### Re: how to give where condition in resident load

Thanks Friends

• ###### Re: how to give where condition in resident load

Hi,

Can you close this thread by selecting appropriate answers

regards

ASHFAQ