How to split col into two columns according to data types [message #661033] |
Mon, 06 March 2017 00:36 |
|
ssyr
Messages: 65 Registered: January 2017
|
Member |
|
|
Hi All,
I have 2 tables containing mix data type values store in in one column. I have to display its name & type according to first table 'ID_Code"
Table 'A'
ID_Code type
aaa aid
111 pgm
bbb aid
222 pgm
ccc aid
333 pgm
ddd aid
Maste Table
Table 'B'
Name ID
aaa 111
bbb 222
ccc 333
ddd 444
On the basis of ID_CODe
Iwant to separate it into Name & ID column.ALso I have to join these two talbes as well.
How can i display it?
please guid me?
[mod-edit: code tags added by bb]
[Updated on: Mon, 06 March 2017 14:14] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: How to split col into two columns according to data types [message #661039 is a reply to message #661038] |
Mon, 06 March 2017 01:49 |
|
Michel Cadot
Messages: 68645 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
OK I moved your post into the correct topic.
Now, What you posted (your own set of data) IS what you have to convert into a test case that is provide the statements for us to work on your issue.
Give the result you want for the tables and data you gave, and explain this result.
Once again the first step is to provide CREATE TABLE and INSERT statements.
[Updated on: Mon, 06 March 2017 02:52] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How to split col into two columns according to data types [message #661061 is a reply to message #661056] |
Mon, 06 March 2017 08:14 |
cookiemonster
Messages: 13920 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
ssyr wrote on Mon, 06 March 2017 10:03this is the issue...that I have to join the tables but there is no column common in betten them but data is is common.that also be in one table it is store in combined format.& in othert able it is in two separate column.
If you don't understand the relationship between the tables then you should be asking the person who designed them (or if they're no longer around someone with in-depth knowledge of the system design). We can't guess what it is.
If you tell us the relationship and what output you want then we can tell you want code you need to do the job, but we can't tell you want your own requirements are.
|
|
|
|
|