SQLite Forum

create unique index and order by not really unique or ordered properly
Login
it has taken some time for this to show again...

```
sqlite> SELECT quote(answerid) FROM answers;
'10070'
'10090'
'10120'
'10140'
'10160'
'10440'
'10470'
'10540'
'11500'
'11630'
'11650'
```

and then there was this...

```
sqlite> select answerid, typeof(answerid) from answers;
10070|text
10090|text
10120|text
10140|text
10160|text
10440|text
10470|text
10540|text
11500|text
11630|text
11650|text
```

and yet this query still fails to return data

```
select * from answers where answerid in (10120,10160);
```

but then I tried this... and I got data.

```
select * from answers where cast(answerid as integer) in (10120,10160);
10120|http://bobville.com|2021-01-28 15:40:53|bob|Waiting for Review
10160|123-123-1234|2021-01-28 16:28:18|bob|Waiting for Review
```