cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender Adapter

Former Member
0 Kudos

Hi Gurus,

I had 2 DB tables, one is header and the other is item.

i need to join these two tables and must get the result of these in to my source.

Header fields: REFERENCE,COMP_NUMBER,CUST_NUMBER,STATUS

Item fields:reference,UPC,description,

For example in my header table i had a record for reference = '100', then in item table i had 3 records for reference = '100',

then how can i retreive all the records that has a same reference numbers from both header and item.

Thanks for your help.

Srinivas

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Solved by myself

Former Member
0 Kudos

Hi Srinivas,

Can you please explain how did you solve the problem.

Thanks,

Srini

Former Member
0 Kudos

Select Header.REFERENCE,Header.COMP_NUMBER,Header.CUST_NUMBER,Header.STATUS,Item.reference,Item.UPC,Item.description from Header,Item where Header.reference = Item.reference.

Former Member
0 Kudos

Hi Srinivas,

You need to create datatype which has all the fields for header and item under one like Record and then select the fields using a join in these two tables. So in your example all the 3 records would come and the header will repeat 3 times with different items.

Please write the sql query by looking at this blog. It should be straight forward.

https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1725 [original link is broken] [original link is broken] [original link is broken]

Regards,

---Satish

Former Member
0 Kudos

Hi,

As per my requirements, i wrote a query like as below

select * from TMP_HEADER INNER JOIN TMP_DETAIL on TMP_HEADER.REFERENCE = TMP_DETAIL.REFERENCE where TMP_DETAIL.REFERENCE in (select top 1 TMP_HEADER.REFERENCE from TMP_HEADER where TMP_HEADER.status = 'READY')

but the communication is not picking up the record in the table, Can you please suggest what may be the issue?

Thanks for your help

Srinivas

Former Member
0 Kudos

Hi,

Can you try to execute this query directly with Database (via SQL editor) and see if you are able to pick-up any values.

Thanks

Swarup