Where clause for aliased column
You can't reference an alias in the WHERE clause.  You'd have to do something like this:

select left(DateTimeSent, 17) as timesent
from allog_07_11_e
where left(DateTimeSent, 17) &lt;&gt; '0'


Likewise, you could also use a subquery:

select *
from
(
    select left(DateTimeSent, 17) as timesent
    from allog_07_11_e
) a
where timesent &lt;&gt; '0'