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 2008 Forums
 Other SQL Server 2008 Topics
 Need sql query to filter alphanumeric data

Author  Topic 

pra123
Starting Member

1 Post

Posted - 2011-12-04 : 10:30:29
Hi All,
I have alphanumeric data in a Table Assets. The column name is Milepost.

Column Values are like below

MilePost

1.24
1.61
4.56
4.78
5.45
6.91
7.19
9.7
11.31
12.96
13.49
13.7
15.4
15.83
18.5
27.11
27.31
30
33.1
34.7
94.9
98
99.55
104.08
104.42
104.55
105.1
209.1
NULL
343.1
LR 1.36
LR 1.90
364.91
364.9
YARD
LR 12.80
LR 1.0
LR 4.41
368.6
342.4
342.57

Now I want to select records between 1 to LR 4.41 which should return all records between 1 to LR 4.41

My below query is not returning proper values. So i need a correct sql query.

Select Milepost from Assets where Milepost between '1' and 'LR 4.41'


Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-04 : 11:54:47
do you mean LR 1.0 to LR 4.41? i cant see 1 alone in values of Milepost

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -