Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Inner join using 2 fields of different sizes

$
0
0

Hi,

I am trying to join 2 different tables based off a field that though of different 'types' but store same data in the 2 tables. In table1, its of data type SSTRING of length70 and in table2 its a char(raw) of length 16. The below inner join statement gives me a run-time error with message "POS(207) Datatypes must be compatible".

Is there an alternate way I can do an inner join using these 2 fields?

Fields in question below - bo_node_id from /ext/d_cus_data table AND node_id from COD_SEOD_SRQ_TIME_REC_ROOT table.

 

 

DATA: BEGIN OF wa,
  bo_node_id    TYPE /ext/d_cus_data-bo_node_id,
  value     type /ext/d_cus_data-value,
  service_request_uuid  type COD_SEOD_SRQ_TIME_REC_ROOT-service_request_uuid,
  end of wa,
  itab like SORTED TABLE OF wa
  WITH UNIQUE KEY bo_node_id value service_request_uuid.

 

SELECT ext~value srq~service_request_uuid
  INTO CORRESPONDING FIELDS OF TABLE itab
  FROM /ext/d_cus_data as ext INNER JOIN COD_SEOD_SRQ_TIME_REC_ROOT as srq on
    ext~bo_node_id = srq~node_id.

 

loop at itab INTO wa.
  WRITE: / wa-value, wa-service_request_uuid.
  ENDLOOP.

 

Thanks,

Vineet.


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>