-
Junior Member
Sql Coding Help
Hi ,
I am new to SQL coding; hopefully, you can help me!
I have this SQL
select ejhannsalary,
ejhdatetimecreated,
ejhhourlypayrate,
ejhisratechange,
ejhjobeffdate
from dbo.emphjob
where ejheeid = '5U8FSP0000K0'
This SQL returns
AnnSalary DateTimeCreated HourlyPayRate IsRateChange JobEffecDate
6240.00 2006-03-10 20:57:57.783 7.500000 N 2005-11-21 00:00:00.000
6240.00 2006-03-10 20:39:36.663 7.500000 N 2005-12-27 00:00:00.000
6240.00 2007-05-04 08:39:50.000 7.500000 N 2007-04-30 00:00:00.000
6656.00 2008-01-03 11:17:32.000 8.000000 Y 2007-12-31 00:00:00.000
6656.00 2008-01-11 16:04:59.000 8.000000 N 2008-01-01 00:00:00.000
I have to capture 2 records here - old salary [6240.00 2007-05-04 08:39:50.000 7.500000 N 2007-04-30 00:00:00.000]
New Salary [6656.00 2008-01-03 11:17:32.000 8.000000 Y 2007-12-31 00:00:00.000]
And the parameters will be EjhDateTimeCreated [From and To]. How can I do this in Stored Procedure?
Your help is greatly appreciated. Thanks [/SIZE][/SIZE]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules