Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
yaman
Posting Yak Master
213 Posts |
Posted - 2008-04-10 : 06:17:50
|
| I WANT TO FIND THAT WORD WHICH IS START'S FROM % KEYWORD SELECT ENAME FROM TABLENAME WHERE ENAME LIKE '%%'HOW CAN I FIND PLS HELP ME OUT . Yaman |
|
|
rengal
Starting Member
8 Posts |
Posted - 2008-04-10 : 06:27:03
|
| Select ENAMEFrom TABLENAMEWHERE ENAME like ' ';Put % at start if the word you want is at the end and vice versaYou can use _ as any letter also e.g. '_ _ _ _ word' |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-04-10 : 06:35:03
|
i think you mean where there is literally a % in the string? and its getting confused with the wildcard characters?if so try this example...declare @t table (col varchar(10))insert into @tselect '%hello'union all select 'hello'select * from @t where col like '|%%' escape '|' Em |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-10 : 06:51:17
|
[code]DECLARE @t table (col varchar(10))insert into @tselect '%hello'union all select 'hello'union all select 'hel%lo'select * from @t where col like '|%%' escape '|'-- Pesoselect * from @t where col like '%[%]%'[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|