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 |
|
soori457
Yak Posting Veteran
85 Posts |
Posted - 2008-02-02 : 00:08:50
|
| How to select a name only containing three characters in a TablePlease help meThanks in AdvanceSuresh Kumar |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-02 : 00:11:26
|
| Can you explain in detail what you are trying to achieve with some sample data & reqd o/p ? |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-02-02 : 00:17:25
|
| Maybe?select * from table where name like '???' |
 |
|
|
soori457
Yak Posting Veteran
85 Posts |
Posted - 2008-02-02 : 01:41:25
|
| EmpNameSureshKarteekKiranRajRamChanduLeeKranthiRaviIn EmpName Coloumn, I have those data.Now I want to retrieve EmpName with three characters only.i.e., The O/P should beEmpNameRamRajLeeNow tell me, How to write select Statement for thatSuresh Kumar |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-02-02 : 02:00:50
|
left(EmpName, 3) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-02 : 02:15:23
|
| or substring(EmpName,1,3) |
 |
|
|
soori457
Yak Posting Veteran
85 Posts |
Posted - 2008-02-02 : 02:30:37
|
| select * from table where name like '___'This Query is workingIs there any other way to retrieve data with three characters only.Suresh Kumar |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-02 : 02:43:09
|
| select * from table where left(EmpName,3) =.....or select * from table where substring(EmpName,1,3) =.....please make your requirement clear with some sample data and expected o/p if you wish to receive quick solution. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-02-02 : 04:14:17
|
select * from table where len(lastname) = 3 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|