I have a table buffer that I get by calling a method on some object. The table buffer has some rows in it. The table is also a TempDb type.
Assume it has
| ID |
COLOR |
| 001 |
RED |
| 002 |
BLUE |
| 003 |
RED |
| 004 |
GREEN |
How can I filter out the rows where the COLOR is RED?
To achieve what I need I am currently looping the records and deleting what I don't need.
snippet:
FtsMtoTmp ftsMtoTmp = isvClass.GetFtsMtoTmp();
while select forupdate ftsMtoTmp
{
if ftsMtoTmp.COLOR == "RED" )
{
ttsbegin;
cmaCWSupply.delete();
ttscommit;
}
}Expected results:
| ID |
COLOR
|
|
002
|
BLUE |
| 004 |
GREEN |
For the sake of the question assume I can't ask the ISV to change their method GetFtsMtoTmp(). Is there a better preferred way to filter the table buffer than what I'm currently doing?