|
|
Archives of the TeradataForum
Message Posted: Fri, 24 Feb 2012 @ 13:46:42 GMT
Subj: | | Retrieve next 50 rows after reference value |
|
From: | | Graham, Fred |
Hi everyone,
I would appreciate any guidance on crafting this query.? One table with columns (ID, DateTimeStamp, Status, Val1, Val2 ?). I need to search
for occurrences of a particular status value (in this case the value is 116).
When I find Status = 116, then I need to retrieve that row and the next 20 rows (as ordered by DateTimeStamp). One of the issues is that the
database is large and the status = 116 will occur many times. I will need to pull the subsequent rows for each occurrence of status=116. Any
thoughts?
Thanks,
Fred
| |