Hi,
declare @sql varchar(max)
declare @val float
set @val=1000000
set @sql='select prgeo,prProID from prfmaPrePricingChecklistProduction where prrevacv < '+ @val
print @sql
exec (@sql)
Here, 'prrevacv' column is of type
nvarchar. While executing this query, it reports
'Error converting data type varchar to float'
How to achieve this functionality. Is any way to convert the column 'prrevacv' to float and use that.
Please help me in this regard.