FROM database_name as db >>> FROM {{select_table.value}} as db

Another possible issue at play might be that you can't use dynamic table or column names by default - see this post: How do I write a SQL UPDATE with dynamic columns