when i try to get only the values which shows 'HIGH' it gives me an error: Converting data type varchar to float. HOW can i get only the records which are 'HIGH'?
(comments are locked)
|
|
At a rough guess, some of your data in the If you RTFM at http://msdn.microsoft.com/en-us/library/ms181765.aspx, you'll see that what you are doing with your OK, it's almost certain to knock back the speed of execution, but if you can't guarantee the quality of the data within the CTE, then it's a way to go. The alternative is, of course, to put a
(comments are locked)
|


Do you have any sample data which can reproduce the error?
I don't get why you declare column names in the WITH-clause of your CTE-declaration, and then use other columns inside the CTE. Fourth column name is named value in the WITH-clause, but rmg in the body.
When i try using with the temp table by including the value coloumn in the select as well as in the CTE coloumn,i get those values, something like
select * from
table
where (ISNUMERIC(REPLACE(value,'%','')) =1) AND (CONVERT(FLOAT,REPLACE(value,'%','')) >9.0)