Click here to Skip to main content
15,666,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have table like this.

EmpName Feedback Code Date

A Ptp 5/4/2012 (Month/Date/Year)
A Visit 5/8/2012
B Ptp 5/25/2012
B Visit 5/1/2012

I need output Like this

EmpName 1-7 Days 7-15 Days 15-Later

Visit A 0 1 0

Visit B 1 0 0

Ptp A 1 0 0

Ptp B 0 0 1

How to write query... Help me..............
Sandeep Mewara 15-May-12 5:20am    
It's not a straight forward or simple query. Did you try anything so far?

As of now, it just looks like an assignment.

1 solution

Share this answer
Member 9403583 6-Feb-13 2:18am    
i need loan aging query in sql server 2005 for report in a bank.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900