SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 sorting and grouping data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

darkental
Starting Member

Peru
1 Posts

Posted - 11/12/2012 :  11:36:10  Show Profile  Reply with Quote
I´ve been having problems with organizing some data, I have to get the time of arrival and exit from a place for each person on a database, and there is many people and places so is a bit complicated

as an example of only one person:

TIME //ORDER//TAG//LOCATION
09:00:00.000// 1 // 1 // 1000 <----
09:01:00.000// 2 // 1 // 1000
09:02:00.000// 3 // 1 // 1000
09:03:00.000// 4 // 1 // 1000 <----
09:04:00.000// 5 // 1 // 1001 <----
09:05:00.000// 6 // 1 // 1001
09:06:00.000// 7 // 1 // 1001 <----
09:07:00.000// 8 // 1 // 1000 <----
09:08:00.000// 9 // 1 // 1000
09:09:00.000// 10 // 1 // 1000 <----
09:10:00.000// 11 // 1 // 1010 <----
09:11:00.000// 12 // 1 // 1010 <----


so TAG is the person and I need to get from a query only the data with an arrow, I´ve been trying with group by, where and/or and anything I could think

does anyone know how to do this?




Edited by - darkental on 11/12/2012 12:11:30

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/12/2012 :  12:14:10  Show Profile  Reply with Quote
What is the rule you are using to determine that TAGs 1,4,5,7,8,10,11, and 12 should be picked, but not the other tags? None of the columns seem to give a clue as to why these are preferred over the others.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000