SQL - seraching for a real number in SQL database

I am looking for a store procedure that will help to search a real number for example 91.91

Any one know how to do it or any exisiting store procedure?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
It's a select statement.

create procedure searchNum
@input  Real

select * from <table> where <col> = @input
awking00Information Technology SpecialistCommented:
Search in what? A column in a table, all columns in a table, all tables in a schema, all tables in a database?
tommym121Author Commented:
I am try to search in the database for such a number (real and money)
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

tommym121Author Commented:
Kyle AbrahamsSenior .Net DeveloperCommented:
Shows the framework of how to loop through the entire database.  

Just change the last exec statement to not bring back the Left part of the column.

and change the where to @ColumnName = @SearchStr2
tommym121Author Commented:

Real number is approximate not precise,  I need to set a tolerance like  abs(@ColumnName - @SearchStr2)/@SearchStr2 < Tolerance to see if @ColumnName = @SearchStr2.  Tolerance can be 10E-6
tommym121Author Commented:
How do I put such a formula in SQL where statement?
Kyle AbrahamsSenior .Net DeveloperCommented:
In that case do a between:

declare @min
declare @max

set @min = subtract tolerance from value

set @max = add tolerance to value

where @columnName between @min and @max

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tommym121Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.