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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 update issue

Author  Topic 

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2009-08-27 : 06:07:42
Can any one help me I have a column of data which contains telephone extensions which can contain letters. I am trying to find any extension number with a letter in it. This can be at the start or at the end and in any multiples.

Many thanks

Whitmoj
If I have inspired one person today then my job is done.

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-08-27 : 06:12:45
can u post some sample data and required output?
Go to Top of Page

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2009-08-27 : 06:16:59
here you go

lll6294
lll6271
LLL2114
LLL2084
LLL2080
LL818
l6995
LL6979
L6972

So example from the above data

Set Column B = '1'
Where Column A = 'L%'
I have tried all wild cards but they dont seem to work

Whitmoj
If I have inspired one person today then my job is done.
Go to Top of Page

ashishashish
Constraint Violating Yak Guru

408 Posts

Posted - 2009-08-27 : 06:18:21
use like instead of = this will solve your problem..

iF theRe iS a wAy iN tHen theRe iS a wAy oUt..
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-08-27 : 06:39:43
use patindex function too..........
Go to Top of Page

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2009-08-27 : 06:48:29
Cheers this worked a treat 90k rows checked and sorted in 5 secs


Whitmoj
If I have inspired one person today then my job is done.
Go to Top of Page

ashishashish
Constraint Violating Yak Guru

408 Posts

Posted - 2009-08-27 : 06:58:25
glad to see it solved......

iF theRe iS a wAy iN tHen theRe iS a wAy oUt..
Go to Top of Page
   

- Advertisement -