2008 May 22 9:48 AM
Hi all,
I have to join AFRU table with a Z table based on two fields
1) RUECK
2) RMZHL
The problem with joining these two fields is in AFRU table both these field's type is Numeric but in Z table both are Character.
Due to that the data is not picked even if both fields have the same value.
In AFRU table both fields have values 000000 and then the no.How I can write the select query so that they can match and give a proper output?
Regards,
Sunny
Hi all,
I have to join AFRU table with a Z table based on two fields
1) RUECK
2) RMZHL
The problem with joining these two fields is in AFRU table both these field's type is Numeric but in Z table both are Character.
Due to that the data is not picked even if both fields have the same value.
In AFRU table both fields have values 000000 and then the no.How I can write the select query so that they can match and give a proper output?
Regards,
Sunny
2008 May 22 9:51 AM
Hi,
The join will not work unless you change the data type in the ztable.
Other way is to do independent selects without using the join.
Shruthi
2008 May 22 9:55 AM
Hi,
You can fetch the data without using join statements as follows:
Select f1 f1 from table1 into itab1
where.........
if itab1 is not initial.
select f1 f2 from table 2 into itab2
for all entries in itab1
where f1 = itab1-f1
and f2 = itab1-f2.
endif.
2008 May 22 9:55 AM
hi,
first create a database view by directly writing the join conditions in se11
(donot use foreign key relation ships button),
then use this database view in your program
use your select query normally.
it will fetch records having the same value of fields in join conditions
hope i am clear
reward if helpful
prasanth
2008 May 22 9:59 AM
the two table fields should have same domain
other wise u can't fetch.
better to change ztable fields as like that standard table
hope it helps..
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |