Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Necesito que me apoyen en el siguiente caso /
I need your support in the following case:
Tabla A
Cod | Nom |
---|---|
1 | AA |
2 | AB |
3 | AC |
4 | AD |
5 | BA |
6 | BB |
7 | BC |
8 | BD |
Tabla B
Cod | Dat |
---|---|
2 | ACV |
3 | BCT |
5 | DGT |
6 | ADD |
Lo que quiero es poder hacer los siguientes filtros
Todo = { 1,2,3,4,5,6,7,8 }
Solo B = { 2,3,5,6 }
Todo lo que esta en A y no en B = { 1,4,7,8 }
What I want is to do the following filters
All = { 1,2,3,4,5,6,7,8 }
Only B = { 2,3,5,6 }
All that is in A and not B = { 1,4,7,8 }
Hi,
Check with this
TableA:
Load * Inline
[Cod,Nom
1,AA
2,AB
3,AC
4,AD
5,BA
6,BB
7,BC
8,BD];
TableB:
LOAD * Inline
[Cod,Dat
2,ACV
3,BCT
5,DGT
6,ADD
];
Temp:
Load Chr(39) & Concat(Distinct Cod,Chr(39) & ',' & Chr(39)) & Chr(39) as CodA Resident TableA;
Let vCodA = FieldValue('CodA',1);
Drop Table Temp;
Temp:
Load Chr(39) & Concat(Distinct Cod,Chr(39) & ',' & Chr(39)) & Chr(39) as CodB Resident TableB;
Let vCodB = FieldValue('CodB',1);
DROP Table Temp;
FilterTable:
LOAD 'Table A' as Tablename,Cod Resident TableA Where Match(Cod,$(vCodA));
LOAD 'Only Table A' as Tablename,Cod Resident TableA Where not Match(Cod,$(vCodB));
LOAD 'Both Table A and Table B' as Tablename,Cod Resident TableA Where Match(Cod,$(vCodB)) and Match(Cod,$(vCodA));
Celambarasan
Hi,
use this script .helpful for u
tableb:
Load * inline [
Cod, Dat
2, ACV
3, BCT
5, DGT
6, ADD
];
Load * where Not exists (Cod);
TableA:
Load * Inline [
Cod, Nom
1, AA
2 , AB
3, AC
4, AD
5 ,BA
6, BB
7 ,BC
8 ,BD
];
tabA:
Load Rowno(),* Resident TableA;
Drop table TableA,tableb
Regards
Perumal A
I have to get the information in Table A and Table B, and then to apply the filters, I need cod and name fields
When you select should show all
Cod | Nom | Dat |
---|---|---|
1 | AA | - |
2 | AB | ACV |
3 | AC | BCT |
4 | AD | - |
5 | BA | DGT |
6 | BB | ADD |
7 | BC | - |
8 | BD | - |
when I select the intersection of Table A and Table B
Cod | Nom | Dat |
---|---|---|
2 | AB | ACV |
3 | AC | BCT |
5 | BA | DGT |
6 | BB | ADD |
when I select the data of Table A that are not in the Table B
Cod | Nom | Dat |
---|---|---|
1 | AA | - |
4 | AD | - |
7 | BA | - |
8 | BD | - |
Hi,
Little more brief please. how you need to filter?Are you going to use filter(List box) with text as Only Table A,Only Table B,Table A-TableB,All?
Celambarasan
precisely that type of filter is the need, the other I put as an example so you can better understand
Hi,
Check with this
TableA:
Load * Inline
[Cod,Nom
1,AA
2,AB
3,AC
4,AD
5,BA
6,BB
7,BC
8,BD];
TableB:
LOAD * Inline
[Cod,Dat
2,ACV
3,BCT
5,DGT
6,ADD
];
Temp:
Load Chr(39) & Concat(Distinct Cod,Chr(39) & ',' & Chr(39)) & Chr(39) as CodA Resident TableA;
Let vCodA = FieldValue('CodA',1);
Drop Table Temp;
Temp:
Load Chr(39) & Concat(Distinct Cod,Chr(39) & ',' & Chr(39)) & Chr(39) as CodB Resident TableB;
Let vCodB = FieldValue('CodB',1);
DROP Table Temp;
FilterTable:
LOAD 'Table A' as Tablename,Cod Resident TableA Where Match(Cod,$(vCodA));
LOAD 'Only Table A' as Tablename,Cod Resident TableA Where not Match(Cod,$(vCodB));
LOAD 'Both Table A and Table B' as Tablename,Cod Resident TableA Where Match(Cod,$(vCodB)) and Match(Cod,$(vCodA));
Celambarasan