Brain not working.... Must help... Here's my data set:
employeeid startdate enddate paycatid ----------- ----------- ----------- ----------- 936 2002-02-08 2002-02-08 1 936 2002-02-11 2002-02-11 1 936 2002-02-12 2002-02-12 1 936 2002-02-13 2002-02-13 11 936 2002-02-14 2002-02-14 1 936 2002-02-15 2002-02-15 1 936 2002-02-18 2002-02-18 11 936 2002-02-19 2002-02-19 11 936 2002-02-20 2002-02-20 11 936 2002-02-21 2002-02-21 11 936 2002-02-22 2002-02-22 11 936 2002-02-25 2002-02-25 7 936 2002-02-27 2002-02-27 7 What I'm wondering is how do I get something like: employeeid startdate enddate same paycatid in a row paycatid ----------- ----------- ----------- ----------- ---------- 936 2002-02-08 2002-02-12 3 1 936 2002-02-13 2002-02-13 1 11 936 2002-02-14 2002-02-15 2 1 936 2002-02-18 2002-02-22 5 11 936 2002-02-25 2002-02-27 2 7 I'm using SQL Server 7. ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists