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 |
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2012-07-02 : 16:58:32
|
how to get the desired results from the following ipTableAIp-------------------------------5.46.200.1.462222.2.1.2.3.4.5.15.46.200.1.462222.2.1.2.3.4.5Expected output:Ip-------------------------------5.46.200.1.462222.2.1.2.3.4.55.46.200.1.462222.2.1.2.3.4thanks for your help in advance |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2012-07-02 : 17:21:27
|
Yes ..exclude the last 2 characters. |
 |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2012-07-02 : 17:24:37
|
declare @whyalwaysme table(id varchar(max))insert @whyalwaysmeselect '5.46.200.1.462222.2.1.2.3.4.5.1'unionselect '5.46.200.1.462222.2.1.2.3.4.5'select left(id, len(id) -2) from @whyalwaysme<><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2012-07-02 : 17:31:14
|
Thanks a lot it works.. |
 |
|
|
|
|