I want to get to know the SQL query to find names of a column (egCustomerName) whose names having (anyletter) ‘l’ as the third letter
Asked
Active
Viewed 52 times
-2
-
I think you are looking for the SQL mid function. http://www.w3schools.com/sql/sql_func_mid.asp – Newd Jun 30 '15 at 13:00
3 Answers
3
Try this query
select * from tablename where CustomerName like '__I%'

Mukesh Kalgude
- 4,814
- 2
- 17
- 32
1
You can get 3rd letter by using SUBSTRING.
Try something like this:
SELECT egCustomerName
FROM Table
WHERE SUBSTRING(egCustomerName, 3, 1) = 'l'

Stanislovas Kalašnikovas
- 9,203
- 4
- 32
- 59
0
Can achieve this with both RIGHT
and LEFT
functions.
Query
select name from tblName
where right(left(name,3),1)='l';
And can achieve this with SUBSTRING
,LIKE
,MID
also.

Ullas
- 11,450
- 4
- 33
- 50