Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I have table A like this
TableA:
Load
FieldA,
FieldB,
From...
Concatenate(TableA)
Load
FieldC,
FieldD,
From...
I wanna create a key with fieldA and fieldC, how can i do?
Thank you for the help.
Best Regards,
Bruno Paulo
Hi,
You can try like this,
TableA:
LOAD * INLINE [
FieldA, FieldB
A, 1
B, 2
C, 3
D, 4
E, 5
];
Concatenate(TableA)
LOAD * INLINE [
FieldC, FieldD
G, 8
H, 27
I, 30
K, 17
Z, 11
];
Final:
load *, FieldA &'|'& FieldC as %Key Resident TableA;
Drop table TableA;
Thanks,Deva
Hi,
basically to create a key you can do this: fieldA&'_'&fieldC as KEY
but you should have the fieldA and the fieldC on both tables..
exactly my problem, field A is on table A and field C is on table B. Im concatenating the tables for single table but i need dat key.
Hi,
You can try like this,
TableA:
LOAD * INLINE [
FieldA, FieldB
A, 1
B, 2
C, 3
D, 4
E, 5
];
Concatenate(TableA)
LOAD * INLINE [
FieldC, FieldD
G, 8
H, 27
I, 30
K, 17
Z, 11
];
Final:
load *, FieldA &'|'& FieldC as %Key Resident TableA;
Drop table TableA;
Thanks,Deva
Hello Bruno, try something like this
TableA:
Load
FieldA,
FieldB,
From...
Concatenate(TableA)
Load
FieldC,
FieldD,
From...
rename TableA to _TableA;
TableA:
load *, FieldA & '.' & FieldB as KEY resident _TableA;
drop table _TableA;
Thank you, perfect. I was searching for this