I have a table named datas
and I'm executing a query like this:
SELECT linkurl AS DOWNLOADURL,
lastrevlevel AS VERSION,
code AS DESCRIPTION,
created AS RELEASEDATE,
name AS TYPE
FROM datas
WHERE id IN (SELECT child_id
FROM datas _datas
WHERE parent_id = (SELECT Max(id)
FROM datas
WHERE code = 'AN4307SW'))
It returns results like this:
DOWNLOADURL VERSION DESCRIPTION RELEASEDATE TYPE
/artifacts/download.txt 2.0 images 25/6/12 download.txt
In the Type
column I am geting name of the file. I need to get the file extension of the file name in the Type
column. How can I achieve this?
Examples:
TYPE
.txt
.pdf
.xls