Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I would like to join two tables (A and B) with the following structure:
A:
X, Y, Z
B:
X, Y, Z, P
The point is that X, Y or Z value is '*' in table B what means "all possible values".
In case X would be '*' I would like to join to A using only Y and Z.
How can I do that? I know in SQL, for instance, you can use functions like isnull(X,'*') so you're kind of ignoring some columns once joining.
Thanks in advance.
Example:
(Table A):
X, Y, Z
M, UK, L
(Table B):
X, Y, Z,W
M,*,*,1
M,N,*,2
I would like to do an applymap on table A using as a Key "X & Y & Z" to get W column from B.
However, table B contains '*' sometimes which means "all values". In this case, I would like to ignore the columns where I have '*' and only use as a Key the rest.
In the example posted, only X would be my key for the first row.
X&Y would be the key for the second row, etc.
What is your expected output?
One way might be to use multiple joinings each one with the appropriate fields and where-statements. But before I would check: Mapping-as-an-Alternative-to-Joining
- Marcus