Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing two fields over a certain percentage

Status
Not open for further replies.

OasisChurch

Technical User
Mar 28, 2002
20
Hi,
Is there a way in T-SQL to compare two fields over a certain percentage?
EX: SELECT [ACCOUNT NO] FROM TABLE1 WHERE VALUE1 >= %5 OF VALUE2

Weird Huh?

thanks in Advance!!
--scotta
 
Just multiply your comparision by .05 to get 5 percent of it. Example:

SELECT [ACCOUNT NO] FROM TABLE1 WHERE VALUE1 >= (VALUE2*.05)

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top