Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
i have an situation which does look like, our customer deleloped the database, within this database we have a tables with 3 fields:
Project, Project_Manager1, Project_Manager2
A, Mike, Simon
B, Tom, Frank
C Yoko Will
i know this database does look like a bit funny, but as you know : Your Customer is your King
i have a question: How can i combine these Fields: Project_Manager1, Project_Manager2 into one Field: ProjectManger
my expected Output is:
Project and Filter as ProjectManager
A Mike
Simon
B Tom
Frank
C Yoko
Will
thanks a lot
Beck
if u keep like this, it will create a synthetic key, but u'll have the right information; to eliminate the synthetic key, proceed as follow:
table1:
load * inline [
Project, ProjectManager
A, Takeshi
B, James
D, Kate
](delimiter is ',');
table:
Crosstable (OptionField, ProjectManager) LOAD * INLINE [
Project, Project_Manager1, Project_Manager2
A, Mike, Simon
B, Tom, Frank
C , Yoko , Will
];
drop Field OptionField from table;
Final:
NoConcatenate
Load * Resident table;
Concatenate
load * Resident table1;
Drop Tables table,table1;
Exit Script;
result:
Hi Beck
In the script just use concate like the one below
Project_Manager1 &' '& Project_Manager2 as ProjectManager
This should get what you want.
Many Thanks
Karthik
Hi Karthik,
Thanks a lot for your feedback, but this way does not work:
my expected output is:
ProjectManager:
Mike,
Simon,
Tom,
Frank
Yoko
Will
thanks a lot
Beck
Mike Simon is the same Manager? as if it was First and Last name of the person?
or u want sthing like :
A Mike
A Simon
?
That answered my question:
table:
Crosstable (OptionField, ProjectManager) LOAD * INLINE [
Project, Project_Manager1, Project_Manager2
A, Mike, Simon
B, Tom, Frank
C , Yoko , Will
];
drop Field OptionField from table;
result:
Hi Omar,
Mike is Project_Manager1
Simon is Project_Manager2
thanks
Beck
check my answer above
thanks a lot
Omar, this was my first option to solution, is there any another way to solve this issue?
Thanks a lot
Beck
Why you're not happy with this solution?
Omar, i am very happy with this solution: shukran,
i thought, what if, if my customer create a few fields within this table,
Imagine: customer creates the fileds; Project_Manager3, Project_Manager4
how can i cover another fields wth crosstable and concatenate them with another table?
thanks a lot
Beck