| Author |
Topic |
|
hubschrauber
Starting Member
16 Posts |
Posted - 2006-03-14 : 10:36:59
|
| I get the following error and I don't know how to solve it:Duplicate column name resolution could not be done because the oridinal specified a column of a different name |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-03-14 : 10:44:42
|
| Post your SQL.. |
 |
|
|
hubschrauber
Starting Member
16 Posts |
Posted - 2006-03-14 : 11:10:11
|
| select * from u_tbl_gefuith_uitsw_openstaand_nw_deze_week inner join s_tbl_rswim_berichten_08x_09x onu_tbl_gefuith_uitsw_openstaand_nw_deze_week.switchid = s_tbl_rswim_berichten_08x_09x.processidechwhere msgtypeid ='1095' and u_tbl_gefuith_uitsw_openstaand_nw_deze_week.itemtype is null |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-14 : 11:18:47
|
| Do u have switchid column in u_tbl_gefuith_uitsw_openstaand_nw_deze_week table ?itemtype column in u_tbl_gefuith_uitsw_openstaand_nw_deze_week table ?processidech column in u_tbl_gefuith_uitsw_openstaand_nw_deze_week table ?msgtypeid name in only 1 table ? |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-03-14 : 11:21:37
|
Do you have a column with the same name in both tables? Also, which table is msgtypeid in?Also, try using alias'select * from u_tbl_gefuith_uitsw_openstaand_nw_deze_week ndwinner join s_tbl_rswim_berichten_08x_09x rb onndw.switchid = rb.processidechwhere msgtypeid ='1095' and ndw.itemtype is null |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-03-14 : 12:01:08
|
| I know it's a foreign language, and I'm sure it's not gibberish if you understand that language, but"u_tbl_gefuith_uitsw_openstaand_nw_deze_week"is one of the longest table names I've ever seen. Yikes! |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
|
|
hubschrauber
Starting Member
16 Posts |
Posted - 2006-03-14 : 12:25:58
|
| I have changed it and I have all the column names, the query parsed succesfull so the excisting of the column names is not the problemselect * from u_tbl_gefuith_uitsw_openstaand_nw_deze_week inner join s_tbl_rswim_berichten_08x_09x onu_tbl_gefuith_uitsw_openstaand_nw_deze_week.switchid = s_tbl_rswim_berichten_08x_09x.processidechwhere s_tbl_rswim_berichten_08x_09x.msgtypeid ='1095' and u_tbl_gefuith_uitsw_openstaand_nw_deze_week.itemtype is null |
 |
|
|
hubschrauber
Starting Member
16 Posts |
Posted - 2006-03-14 : 12:28:14
|
It works in the sql query analyzer, but it doesn't work in the DTS |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-03-14 : 12:33:46
|
Aliasing really is the way to go for you, how about if you list the column names you want instead of using *?A quick way to do this is to:select 'ndw' + column_name + ',' from information_schema.columns where table_name = 'u_tbl_gefuith_uitsw_openstaand_nw_deze_week' order by ordinal_position then do this for the other table and take the last comma off.. |
 |
|
|
hubschrauber
Starting Member
16 Posts |
Posted - 2006-03-15 : 05:11:36
|
I have sloved the problem....like this select u_tbl_gefuith_uitsw_openstaand_nw_deze_week.*, s_tbl_rswim_berichten_08x_09x.msgtypeid as berichtfrom u_tbl_gefuith_uitsw_openstaand_nw_deze_week CROSSjoin s_tbl_rswim_berichten_08x_09x where msgtypeid ='1095' and u_tbl_gefuith_uitsw_openstaand_nw_deze_week.itemtype is nullandu_tbl_gefuith_uitsw_openstaand_nw_deze_week.switchid = s_tbl_rswim_berichten_08x_09x.processidech |
 |
|
|
|