Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jcb267
Constraint Violating Yak Guru
291 Posts |
Posted - 2008-12-01 : 10:10:53
|
I am new to SQL and inherited this query and do not understand what it it trying to do. Can anyone help me with this?select e.lastName, e.firstName, right(a.acctNumber, (len(a.acctNumber) - charindex('.', a.acctNumber))) as Account_Number, h.daterequested, h.datefinalized, h.requesterName, h.relationshipToMember,h.reason, h.arrearsToForgivefrom hardship_request h, account a, employee e where h.account_id = a.id and a.id = e.account anddatediff(mm, h.dateFinalized, getdate()) = 1 and status = 'Denied' ; |
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2008-12-01 : 10:20:37
|
You are displaying employee details , account details and request details for all employees whose requests have been denied in the last 2 months. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
|
|
|
|
|
|