Sorry.. that won't work for 10.1.12.. Wrong solution.
"Omnibuzz" wrote:
> try this
>
> SELECT * FROM @Tab WHERE vc like '10.1.[^.%]'
>
> --
> -Omnibuzz (The SQL GC)
>
>
http://omnibuzz-sql.blogspot.com/ >
>
>
> "aneeshattingal" wrote:
>
> > SET NOCOUNT ON
> >
> > declare @tab table(vc varchar(2000))
> > insert into @tab select '10.1'
> > insert into @tab select '10.1.1'
> > insert into @tab select '10.1.2'
> > insert into @tab select '10.1.1.1'
> > insert into @tab select '10.1.1.1.1'
> >
> > The problem is that i need to select only 10.1.1 and 10.1.2 when i put input
> > as 10.1
> > If I give input as 10.1 , it should select only records 10.1.1 and 10.1.2
> >
> > I tried this but not working
> > SELECT * FROM @Tab WHERE vc like '10.1.[^.]%'
> >
> >