How to get the extension of a file name using a SQL Server stored procedure -


how extension of file name using sql server stored procedure?

i want extension of file name

for example, if file name sdgfh_h670-ff.docx, result should .docx.

you can use sql server's built in string functions:

select right('sdgfh_h670-ff.docx',charindex('.',reverse('sdgfh_h670-ff.docx'))) 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -