title: How to assign a sql query result to a variable in stored procedure
body: <p>I am trying to assign a simple sql query result in stored procedure to a variable which I will use it later in another sql statement. If I execute below statement with out putting in procedure it works but not with stored procedure, I get an error while calling sp , Can someone please help me here ?</p>
  <pre><code>Procedure code:
  $$
  VAR NAME = 'ABC'
  SET (COUNT_VALUE) = (SELECT COUNT(*) FROM COUNT_TABLE)
  
  With out Procedure below code works
  SET (COUNT_VALUE) = (SELECT COUNT(*) FROM COUNT_TABLE)
  select $COUNT_VALUE
  </code></pre>
  <p>Thanks</p>