SQLite Select Query with Column names
<pre><code> public Cursor getAcceptedTasks(String empID){
        return  database.rawQuery("select * from Assignments left join Tasks on Tasks._id = Assignments.TaskID left join Flights on Flights.ARR_FLT_ID = Tasks.ArrivalFlightID where Assignments.TaskAccepted='Y' and Assignments.AssignedTo=?", new String[]{ String.valueOf(empID) });
     }
</code></pre>

<p>This is working perfectly. If I mention Column names instead of *, it fails. What am I doing wrong? </p>

<pre><code> public Cursor getAcceptedTasks(String empID){
        return  database.rawQuery("select Tasks.Aircraft, Tasks.Discrepancy, Flights.ARR_FLT from Assignments left join Tasks on Tasks._id = Assignments.TaskID left join Flights on Flights.ARR_FLT_ID = Tasks.ArrivalFlightID where Assignments.TaskAccepted='Y' and Assignments.AssignedTo=?", new String[]{ String.valueOf(empID) });
     }
</code></pre>
