I am doing a query to a sqlite database so that it returns the trackid, song and duration but they ask me for the duration to be short, medium or long depending on the number, I can get the trackid, the songs and the durations but I do not get that the duration field which is an int is displayed as a text string
I am executing the following query:
SELECT TrackId, Name as [cancion], Milliseconds as [duracion] FROM tracks;
I try to use select cast(Milliseconds as text) from tracks;
but it returns empty
Any ideas??
Thanks in advance
You can do this:
The CASE is the same as an IF within a query