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 |
|
vsk457
Starting Member
1 Post |
Posted - 2008-02-02 : 02:56:13
|
| Using Like operatorI want to display Names ending with XYZ. But, the starting letter should be either A, B OR C.Example:AXYZ BXYZCXYZTell me how to do thatThanks in Advance |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-02 : 02:58:45
|
| SELECT ColumnName FROM Table WHERE ColumnName LIKE '%XYZ'or SELECT ColumnName FROM Table WHERE RIGHT(ColumnName,3)='XYZ'or SELECT ColumnName FROM Table WHERE SUBSTRING(ColumnName,LEN(ColumnName)-2,3)='XYZ' |
 |
|
|
soori457
Yak Posting Veteran
85 Posts |
Posted - 2008-02-02 : 04:11:57
|
| select empname from emp1 where empname LIKE '[abc]xyz'Suresh Kumar |
 |
|
|
kiruthika
Yak Posting Veteran
67 Posts |
Posted - 2008-02-02 : 09:00:04
|
| Hi!select empname from emp where empname like'[abc]%[x][y][z]'kiruthika!http://www.ictned.eu |
 |
|
|
|
|
|