SELECT distinct STG.*,‘D’ as FLAG FROM test STG left join
(
select distinct * from test1 b
where b.acc = “”" + str(f"{inbody[‘id’]:0>10}“) + “'” + “””
)
Original on Original.acc= STG.acc
where Original.acc is null
in HANA i am getting one record but unfortunately in python i am getting 2 records
in the middle that it is a copy/paste of part of a multiline Python
string expression.
Kishore, you might do better to (a) show the surrounding code and (b)
actually print() the resulting piece of SQL you’re generating, and
show us that too. Maybe it isn’t making the query you thought it was.
Also, when pasting in code, put it between triple backticks to preserve
the formatting, eg: