Application Development and Automation 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: 
Read only

exec sql with left join

former_member323084
Discoverer
0 Likes
844

dears ,

i have a statement using inner and left join but the left join not working because it give me all data , it is assumed select all data except the data on left join table ,this is a statement for any one can help me ,thanks.

SELECT h.StoreId , convert(varchar, h.Time, 112), datepart(hh, h.Time), ( l.Quantity * l.price ) as Sales, l.SalesTax as Tax, h.TransactionNumber , l.AutoID, l.quantity

FROM [dbo].[Transaction] as h

inner join [dbo].[TransactionEntry] as l

on h.TransactionNumber = l.TransactionNumber

and h.StoreID = l.StoreId

left join [dbo].[SAP_UploadedAutoIDs] as sa

on l.autoid = sa.autoid

where h.Time = '03-10-2018 00:00:00'

1 REPLY 1
Read only

matt
Active Contributor
553

If your DB is Oracle, I suggest you ask on an Oracle forum. If it's HANA; then you want the HANA tag. This isn't an ABAP question - it's an SQL question. The fact that you're using ABAP EXEC to run it is kind of irrelevant.