hi,
i have many troubles with a stored procedure which should select lines that have 3 or more times the same result value.
the table is a logfile table and the structure coulnd't be edited by me:
so, now i want to filter out all rows on which one person have consecutively 3 or more "0" in table, so the result should be:
do i need cursors for that or temp tables to do it?
many thanks for your help and sorry for my poor english
cya
andy
i have many troubles with a stored procedure which should select lines that have 3 or more times the same result value.
the table is a logfile table and the structure coulnd't be edited by me:
Code:
TIME NAME VALUE
0000 Smith 100
0013 Josh 100
0014 Smith 0
0320 Smith 0
0440 Josh 100
0510 Ohara 100
0615 Smith 100
0705 Ohara 0
0806 Ohara 0
0913 Smith 0
1014 Josh 100
1115 Ohara 0
1245 Josh 100
1320 Smith 0
1350 Ohara 0
1410 Smith 100
1420 Ohara 100
1430 Ohara 0
...
so, now i want to filter out all rows on which one person have consecutively 3 or more "0" in table, so the result should be:
Code:
TIME NAME VALUE
0705 Ohara 0
0806 Ohara 0
1115 Ohara 0
1350 Ohara 0
do i need cursors for that or temp tables to do it?
many thanks for your help and sorry for my poor english
cya
andy