I have this sql query using Commont Table Expression:
with a as(select top 1 flow_id from flow where invoice_id>0)
,b as(select '45' as col2)
select * from a,b
if none of the rows satisfy the condition invoice_id>0
in the flow
table, then I get the following result:
I want the following result even if no records are found from flow
table:
Can this be done?