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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 please help- how to add for evry row 15 minutes wi

Author  Topic 

midan1
Starting Member

39 Posts

Posted - 2008-04-29 : 20:21:45
please need help
i need to create view_circuit like this
for evry row add 15 minutes with condition by station field


Table before

start time@=14:30

ORDER BY 6,9,15

point_collection employee station seated

-----------------------------------------------------------------------------------

start time@=14:30
aaaa 6 station-6

xxxx 9 station-9

nnnnn 9 station-9

cccc 15 station-15

dddd 15 station-15

yyyy 15 station-15

...............................

.........................



Table After

point_collection employee station seated

-----------------------------------------------------------------------------------

14:30 aaaa 6 station-6

14:35 xxxx 9 station-9

14:35 nnnnn 9 station-9

14:40 cccc 15 station-15

14:40 dddd 15 station-15
14:40 yyyy 15 station-15

..................

...................

i must to create different report evry time

with different employee

sometimes i need to change the to evry 10 minutes

and

sometimes i need to change the to evry 5 minutes ......

i need help how to make it dynamic

and if the station in the next row is the same number than not add +10 OR 5 OR 15 minutes

interval@=5 minutes

interval@=10 minutes



start time@=07:30

sometimes i need to like this



point_collection employee station seated

-----------------------------------------------------------------------------------

07:30 aaaa 6 station-6

07:35 xxxx 9 station-11

07:35 nnnnn 4 station-4

07:40 cccc 15 station-15

07:40 dddd 15 station-15

07:40 yyyy 15 station-15

..................

TNX



........



tnx for the help
   

- Advertisement -