I'm using dbeaver with connection to snowflake database. I want to select data with join clause. but I need to do it with parameters. my code is:
select count(*) from my_table as a ${join}
var join = 'LEFT JOIN table_b AS b ON a.ID = b.ID AND b.NAME = a.NAME'
when I run the select statement (in dbeaver), I get pop up asking me to fill ${join} value,
I put the value in the textbox and the command runs. I get WRONG result! (1,254,242)
But when run the following command:
select count(*) from my_table as a LEFT JOIN table_b AS b ON a.ID = b.ID AND b.NAME = a.NAME
I get correct result (900,254)
anybody can help please? thank you.