Skip to main content
Solved

Joining SQL table with IAL table issue


Forum|alt.badge.img+5

I am getting syntax error when trying to join SQL query with IAL table. Any clues??

 

 

select order_no, order_date from(

 

select *
from ifsinfo.icfr_pro_116b
where project_id = '20012') X

 

join IFSAPP.purchase_order Y

 

on

 

X.order_no = Y.order_no

 

 

Thanks

Housseiny

Best answer by jolnse

Try this 

select *
from ifsinfo.icfr_pro_116b  X
join IFSAPP.purchase_order Y on X.order_no = Y.order_no
where x.project_id = '20012'

 

But i do belive you need to go to the old standard for Join tables then you need to do like this 

 

select *
from ifsinfo.icfr_pro_116b  X,
      IFSAPP.purchase_order Y 
where  X.order_no = Y.order_no 
and    x.project_id = '20012'

 

 

Both should give the same result

 

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+8
  • Sidekick (Partner)
  • 27 replies
  • Answer
  • April 25, 2023

Try this 

select *
from ifsinfo.icfr_pro_116b  X
join IFSAPP.purchase_order Y on X.order_no = Y.order_no
where x.project_id = '20012'

 

But i do belive you need to go to the old standard for Join tables then you need to do like this 

 

select *
from ifsinfo.icfr_pro_116b  X,
      IFSAPP.purchase_order Y 
where  X.order_no = Y.order_no 
and    x.project_id = '20012'

 

 

Both should give the same result

 


Forum|alt.badge.img+5
  • Author
  • Sidekick (Customer)
  • 11 replies
  • April 25, 2023
jolnse wrote:

Try this 

select *
from ifsinfo.icfr_pro_116b  X
join IFSAPP.purchase_order Y on X.order_no = Y.order_no
where x.project_id = '20012'

 

But i do belive you need to go to the old standard for Join tables then you need to do like this 

 

select *
from ifsinfo.icfr_pro_116b  X,
      IFSAPP.purchase_order Y 
where  X.order_no = Y.order_no 
and    x.project_id = '20012'

 

 

Both should give the same result

 

First proposed code worked like a charm. Many thanks for you rhelp


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings