title: SYSDATE FROM DUAL in another SELECT
body: <p>I have problems with time in my select. Time in DB is different than system time so I guess I need to use <code>SELECT SYSDATE FROM DUAL</code> but it doesn't work in another select. I use PL/SQL Developer.</p>
  
  <pre><code>SELECT t.something1,
         ROUND((TRUNC(SELECT SYSDATE FROM DUAL) - 1 + 2),1) AS NAME
  FROM customers t
  WHERE t.something1 = ROUND((TRUNC(SELECT SYSDATE FROM DUAL) - 1 + 2),1);
  </code></pre>
  
  <p>I have also tried to declare new variable but I always get error message.</p>
  
  <pre><code>DECLARE
  day DATE
  SELECT SYSDATE
  INTO day
  FROM DUAL
  SELECT t.something1,
         ROUND((TRUNC(day)- 1 + 2),1) AS NAME
  FROM customers t
  WHERE t.something1 = ROUND((TRUNC(day) - 1 + 2),1);
  </code></pre>