Using DATEDIFF(type, startdate, enddate) with values that come from other tables
<p>All of the examples that are online are getting the <code>DATEDIFF()</code> using values that are hard coded.  </p>

<p>I want to get the <code>DATEDIFF()</code> from 20 or 30 rows in a table that have columns named <code>startdate</code> and <code>enddate</code>.  </p>

<p>The end goal for me is to get seconds between two dates for 20 rows... I created a variable above and <code>SET</code> the variable equal to <code>DATEDIFF(SECONDS, startdate, enddate)</code>, but when I go to grab the values in the table that is holding the start and end date, I am getting errors.  </p>

<p>Is there something I'm doing wrong, logically anyways?</p>