From sql to qlik view declare variable
<p>I am new to QV and am having a problem transferring this query to QV. What am I doing wrong?</p>

<pre><code>ODBC CONNECT TO XXX);
abc:
SQL DECLARE @www INT
SET @www= ( SELECT max(Id)  FROM [].[].[] where)
SQL select *
    FROM [].[].[] 
    JOIN [].[.[] on .[] = .[]
    where [qqq] = @www
    order by rrr desc;
</code></pre>