I have a table like so:

```
1|EC7599A156DB1913AD9DE9A3A9540624B05683EC|Bar|World's Greatest|http://www.foo.com
2|EC7599A156DB1913AD9DE9A3A9540624B05683EC|Bar|World's Greatest|http://www.foo.com
3|EC7599A156DB1913AD9DE9A3A9540624B05683EC|Bar|World's Greatest|http://www.foo.com

```

The schema for the table is:

```
CREATE TABLE IRChannels (
    ChannelId INTEGER PRIMARY KEY, 
    ChannelHash BLOB NOT NULL, 
    ChannelTitle TEXT NOT NULL, 
    ChannelDesc TEXT, 
    ChannelLink TEXT);

```

I try to run a `SELECT` statement using the following code:

```
if (mReadDatabase != null) {
     String[]   columns = new String[]{COL_CHANNEL_ID};
     String     selection = COL_CHANNEL_HASH + "='" + hash + "'";
     try {
         Cursor cursor = mReadDatabase.query(
             TABLE_CHANNELS_NAME,      // Table Name 
             columns,                  // Channel ID
             selection,                // WHERE ChannelHash
             null,                     // = hash
             null,                     // Don't  Group
             null,                     // Don't filter by Groups
             null,                     // Use default Sort Order
             String.valueOf(1));       // LIMIT 1

         if (cursor.moveToFirst()) {
             return cursor;
         } else 
             return null;
    }

```

Problem is I never see any data in the returned cursor. If I try the following command in the sqlite3 shell, I'm able to get the data:

```
select channelid 
from irchannels 
where channelhash='EC7599A156DB1913AD9DE9A3A9540624B05683EC' 
limit 1

```

What could I be missing?

**UPDATE:**
I tried changing my code to using raw query like so, still no difference:

```
if (mReadDatabase != null) {
    String        selection = COL_CHANNEL_HASH + "='" + hash + "'";
    final String  rawQuery = "SELECT " + COL_CHANNEL_ID +  
                " FROM " + TABLE_CHANNELS_NAME + " " + 
                " WHERE " + selection + 
                " LIMIT 1;";
        Cursor cursor = mReadDatabase.rawQuery(rawQuery, null);
}

```