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 2000 Forums
 SQL Server Development (2000)
 want to pull only selected data

Author  Topic 

sachingovekar
Posting Yak Master

101 Posts

Posted - 2009-07-10 : 01:16:34
Hi,

I have a table with

create table #temp
(
userid varchar(100)
)

insert into #temp1 values('1234567')
insert into #temp1 values('HG78960')
insert into #temp1 values('0987654')
insert into #temp1 values('KJ87654')

WANT OUTPUT:
HG78960
KJ87654

Regards
sachin

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-07-10 : 01:23:43
select userid from #temp where userid in ('HG78960','KJ87654')

or select * from #temp where userid like '%[a-z]%'
Go to Top of Page

sachingovekar
Posting Yak Master

101 Posts

Posted - 2009-07-10 : 04:47:24
Thanks
Sachin
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-07-11 : 08:56:44
welcome
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-07-11 : 09:01:02
And if you want to select data that starts with alphabets,

or select * from #temp where userid like '[a-z]%'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -