Skip to content

Tag: sql-server

How to Update a column Before Select?

I am setting a stored procedure for select and I want to update the value of one column in the database Before doing the Select. This is what I tried but it’s not working. @roleID int and @query …

Casting to a decimal in SQL

The max value in my table for measure_rate is 572. The below query returns that value. SELECT cast(max(measure_rate) as decimal) FROM [SurgicalMeasures] WHERE measure_rate != ‘N/a’ and …