SQLite Forum

Select of text that matches scientific notation format automatically converted to number
Login
I am extracting data from an existing SQLite 3 database. The database was built with the affinity type for a given column set to NONE. One column contains an 3 - 4 digit airport code. In most cases, select statements return the data from this column as text. However, in a few cases where the ID matches the scientific notation format (nEn) the identifiers are returned as integers. 

An example using the Dell City, Texas airport - identifier '2E5':

```
sqlite> SELECT location_identifier FROM APT_APT WHERE landing_facility_site_number = '23741.21*A';
200000
```

That should have returned ``2E5``. And even trying to force cast the column doesn't work:

```
sqlite> SELECT cast(`location_identifier` as text) FROM APT_APT WHERE landing_facility_site_number = '23741.21*A';
200000
```

Is this an SQLite bug? Is there another cast format that might give me what I'm expecting? Thanks!