[resolved] selecting rows where column value changed from previous row

One Star

[resolved] selecting rows where column value changed from previous row

how to implement this in talent with tMap. Don't know where to put 'limit 1'
SELECT a.*
FROM tableX AS a
WHERE a.StatusA <>
( SELECT b.StatusA
FROM tableX AS b
WHERE a.System = b.System
AND a.Timestamp > b.Timestamp
ORDER BY b.Timestamp DESC
LIMIT 1
)

Accepted Solutions
Moderator

Re: [resolved] selecting rows where column value changed from previous row

Hi,
There is no Limit on reading row in tMap which means selecting from the specified location with the specified line number, but you can make a limit in tfileinputxxx component. You can set "head", Footer and Limit in component setting.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

All Replies
Moderator

Re: [resolved] selecting rows where column value changed from previous row

Hi,
There is no Limit on reading row in tMap which means selecting from the specified location with the specified line number, but you can make a limit in tfileinputxxx component. You can set "head", Footer and Limit in component setting.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.