Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2010, 07:24 PM
Authorized User
 
Join Date: May 2007
Posts: 73
Thanks: 4
Thanked 0 Times in 0 Posts
Default SQl Query

I got the following sample data in my sql Table.
Job Title
Annual Salary
Developer
£15,000 to £20,000
Developer
£15,000 to £20,000
Developer
£15,000 to £20,000
Developer
£15,000 to £20,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£20,000 to £25,000
Developer
£25,000 to £30,000
Developer
£25,000 to £30,000
Developer
£25,000 to £30,000
Developer
£25,000 to £30,000
Developer
£25,000 to £30,000
Developer
£25,000 to £30,000
Developer
£25,000 to £30,000
Developer
£30,000 to £35,000
Developer
£30,000 to £35,000
Developer
£30,000 to £35,000
Developer
£30,000 to £35,000
Developer
£35,000 to £40,000
Developer
Over £40,000
Developer
Over £40,000
Developer
Over £40,000
Developer
Over £40,000
I am trying to built a salary checker tool and want to write a storeprocedure query that would takes salary range as input parameter then divide the Annual salary rows into four main section e.g 1%-25%, 26%-50%,51%-75%,76%-100% and then return output paramet 1 OR 2 OR 3 OR 4 on bases where input salary lies.

If its easy to perform this operation in code behind file then please do let me know.
__________________
Cheers
Sheraz





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql query abhishekkashyap27 SQL Server 2005 11 June 20th, 2008 02:21 AM
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
SQL query? spark SQL Language 4 June 15th, 2005 08:39 PM
Help with SQL Query jammykam SQL Language 4 October 19th, 2003 07:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.