This is a discussion on Using like predicate within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, i want to search record in a table where a varchar column is equal to a word or ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, i want to search record in a table where a varchar column is equal to a word or this word with the letter 's' or this word with the letter 'e'. Today, i've this query : select * From Table Where Column = 'Word' or Column like 'Word[es]' I want to remove the 'or' of this query to have only one condition. Does someone know a solution to my problem. Excuse my poor english language. I hope you understand my problem and thks for solution. |
| |||
| Have you tried, select * from Table where column like 'Word%' This will select any record where the column starts with Word and anything after that. Oscar... "Benoit Le Goff" <begoo@caramail.com> wrote in message news:b4eb6433.0407150754.bfa2c00@posting.google.co m... > Hi, > i want to search record in a table where a varchar column is equal to > a word or this word with the letter 's' or this word with the letter > 'e'. > Today, i've this query : > > select * From Table Where Column = 'Word' or Column like 'Word[es]' > > I want to remove the 'or' of this query to have only one condition. > Does someone know a solution to my problem. > > Excuse my poor english language. > I hope you understand my problem and thks for solution. |
| ||||
| I don't want Word with anything after, i just want Word with e or s, only that. So i can't use the %. Thks for your help. "Oscar Santiesteban Jr." <oscarsantiesteban@worldnet.att.net> wrote in message news:<ElGJc.261123$Gx4.184747@bgtnsc04-news.ops.worldnet.att.net>... > Have you tried, > select * from Table where column like 'Word%' > > This will select any record where the column starts with Word and anything > after that. > > Oscar... > > "Benoit Le Goff" <begoo@caramail.com> wrote in message > news:b4eb6433.0407150754.bfa2c00@posting.google.co m... > > Hi, > > i want to search record in a table where a varchar column is equal to > > a word or this word with the letter 's' or this word with the letter > > 'e'. > > Today, i've this query : > > > > select * From Table Where Column = 'Word' or Column like 'Word[es]' > > > > I want to remove the 'or' of this query to have only one condition. > > Does someone know a solution to my problem. > > > > Excuse my poor english language. > > I hope you understand my problem and thks for solution. |