Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Query report issue with Joins

Former Member
0 Kudos

HI Everyone,

I'm facing a issue with SQ02, where I need to link 2 table COVP and AFRU . Now that I have 2 feilds in COVP REFBN and AWORG which is or Char(10) feilds and I need to link this with tabl;e AFRU feilds RUECK and RMZHL which is of Num(10) and Num(4).

I cant use a join link between these 2 feilds as it says illegal join. Now I need to pull data by the input from COVP that of refbn and aworg.

Please let me know how to go about and implement this? Is there a way where I can use the code section and write code for this. I need to further add another table CATSDB from the output from AFRU.

Thanks & Best regards,

Raj

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Raj,

I had the same problem with other join, since the two fields are different it is not possible to use a join on them.

The only solution that occurred to me was to create an auxiliary table to map both fields with all possible values, like this:

| fild1 | field2 |

| 001 | 00001 |

| 002 | 00002 |

....

And a view with one of the tables together with this auxiliary one. Then the join would use this view...

I admit it isn't pretty, but it would work. However in the end I've decided to write a program instead of using a query to obtain our client's desired map.

best regards,

Edgar

1 REPLY 1

Former Member
0 Kudos

Hi Raj,

I had the same problem with other join, since the two fields are different it is not possible to use a join on them.

The only solution that occurred to me was to create an auxiliary table to map both fields with all possible values, like this:

| fild1 | field2 |

| 001 | 00001 |

| 002 | 00002 |

....

And a view with one of the tables together with this auxiliary one. Then the join would use this view...

I admit it isn't pretty, but it would work. However in the end I've decided to write a program instead of using a query to obtain our client's desired map.

best regards,

Edgar