sql server 2008 - Interesting SQL query issue -
I have such a table (yes the structure is useless, can not change it):
ID | Line | Position | Timestamp | Association 1 | A. Close 10:30 am F2da3 2 | A. AK | 10:15 am | F2da3 3 | A. Open | At 10:00 am F2D3 4 | A. Close At 9:10 | J7S9D5 | A. AK | 08:45 p.m. | J7S9D6 | A. Open | At 08:00 am I need a SQL query which will give me the time (in minutes) between 'open' and 'time off' I copy per association.
Then the output table will look like this:
association | OpenTalkLos time F2D3 | 30J7S9D | 70
Looks like SQL queries? I am far away from my element and appreciate any help!
Is it looking for you? This work will provide association, the situation is unique. (Select from * from table * where position = 'Open') A AOCASEAD ======================= < Select a AOCISSIDIDID, DATEDIFF (MIN, A. Timestamp, B. Timestamp) from BASSACIDID
Comments
Post a Comment