Doe
Doe

Reputation: 11

casting numeric to Text in SQLite

While converting numeric column to TEXT in SQLite, the resultant value has been displayed by appending .0 at the end. For Eg: 2017 as 2017.0 while converting it to text. Expected Result: 2017 casting to text will remain as 2017.

Upvotes: 1

Views: 3551

Answers (1)

juergen d
juergen d

Reputation: 204756

You can cast two times to remove the double precision

select cast(cast(Sheet1.Sample as int) as varchar);

Upvotes: 1

Related Questions