Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody!
Today i would ask if you could help me.
I'm starting a project, maybe a bit difficult for me, but not for u! (i will be really greatful if someone could give me some advices)
The project is defined as follows:
I have n firms that could be client or supplier (flag C or S) of n other firms(indicates by Code). I should create all the possible combinations between them.
Key/legend:
a(firm) -->(corresponds) 20(code as supplier);
b --> 21;
c --> 10;
d --> 11;
Table for The Seller
Firm | Client/supplier | Code | Materials | Assets | Method |
---|---|---|---|---|---|
a | c | 10 | 00000 | 11111 | P |
b | c | 11 | 22222 | 45454 | S |
Table for The Acquirer (indicates the invert selection: i mean, if Firm a has a client identificated with 10, firm 10(which has an alfanumeric field associated) should appears in the follows table:
Firm | Client/supplier | Code | Materials | Assets | Method |
---|---|---|---|---|---|
c | s | 20 | 00000 | 11111 | P |
d | s | 21 | 22222 | 45454 | s |
Thanks so much in advance. If it is not clear, dont' hesitate to ask informations!
not clear....post output sample
Can you be more specific with what your problem is?
I need as Output, two tables.
The first should describe the transaction from the point of view of a SELLER.
The second table, the situation of the ACQUIRER.
I need to give an interpretation about:
-reading the first table, i should be able to say: a is the supplier of the firm with code 10 with an amount of ....(raw materials, assets, goods...)
-reading the second table, i have to say the opposite relation: the firm with code 10 (firm c) is client of the firm with code 20.
The input file is an excel file with the firm (a,b,c) and a corresponding code(that i need in the second table).
I need as Output, two tables.
The first should describe the transaction from the point of view of a SELLER.
The second table, the situation of the ACQUIRER.
I need to give an interpretation about:
-reading the first table, i should be able to say: a is the supplier of the firm with code 10 with an amount of ....(raw materials, assets, goods...)
-reading the second table, i have to say the opposite relation: the firm with code 10 (firm c) is client of the firm with code 20.
The input file is an excel file with the firm (a,b,c) and a corresponding code(that i need in the second table).
Elaborate more...
ok well,
let's make an example:
Supplier Table:
Supplier_code | Supplier_Name | Supplier_abbreviation | Client |
---|---|---|---|
31 | Dog | D_50 | Cat |
45 | Fox | F_41 | Bear |
.. | ... | ... | ... |
Client Table:
Client_code | Client_Name | Client_abbreviation | Supplier |
---|---|---|---|
65 | Cat | C_90 | Dog |
35 | Bear | G_12 | Shark |
.. | ... | ... | ... |
these are my two input file.
My output should be able to show a table like that (one table or two tables, it doesnt' matter)
Code | S/C | Code_ |
---|---|---|
D_50 | C (indicates that 31 has a client) | 65 |
F_41 | C | 35 |
C_90 | S (indicates that 65 has a supplier--> | 31 |
the first row means that:
D_50 has 65 as client (C) Cat (where 65 indicates (check in Client Table) );
the second row:
Fox has 35 as client (thus, Fox has Bear as client). I need to create that relation.
Third row:
Cat has a supplier (S) named 31 (that represents DOG)
I have to show the follows fields:
for suppliers:
Supplier_abbreviation | S/C | Client_code |
---|---|---|
C | ||
C |
for client:
Client_abbreviation | S/C | Supplier_code |
---|---|---|
S | ||
S |
go explanation ..will do in free time and update you
I think you need play around with JOINS and then concatenation of the data.
1st step: JOIN Supplier Table and Client Table based on columns Client and Client_Name resp. and a Flag as 'Client' or 'C' while Loading data.
2nd step: JOIN Supplier Table and Client Table based on columns Supplier_Name and Supplier resp. and a Flag as 'Supplier' or 'S' while Loading data.
And then concatenate the result if you need one single table.
Hope this was helpful.
Thanks,
Singh
NEW Table
Load Supplier_Code AS CODE
Supplier_Name
Supplier_apprevation AS CODE
Client
'S' AS S/C
From Supplier
CONCATENATE(NEW TABLE)
Load Supplier_Code AS CODE
Supplier_Name
Supplier_apprevation AS CODE
Client
'C' AS S/C
From Client
This will create one table Named New Table
If you want to create two tables: Replace concatenate with no concatenate
Hope this helps!