|
发表于 2014-3-18 18:57:06
|
显示全部楼层
slique-cya wrote:when I write the same SQL language in the TurboIntegrator using the ODBCOutput, it gives me an output of "1" (which i'm not sure what it means).
Select count (*) from vj_abc_finance_cost;
First thing, I have no idea, how does it return this "1". AFAIK ODBCOutput is not a function that returns anything. It can be used to initiate Insert/Delete/Create actions in the database. Technically it can have the "select" command, but I do not see any chance to get the "select" result thanks to ODBCOutput (this result potentially can be something more than just one row/one column value).
Second, even if there is a place when you can see this "1" I would suspect it is just a flag that tells "there were no problems with executing given SQL", maybe it would return "0" when you query select on a table that does not exist... I don't know.
Third is (as lotsaram said) TM1 iterates through all the records, so yes, "it is in the pudding".
Fourth, if you still (for some reason) need to know how many rows are there (e.g. before you run the major process you need to make sure there are more than 100 records, so in this particular weird case lotsarams good tip would not be enough) you need to have another process run as a subprocess with your select command right there in the Data Source tab you mentioned. You can then process this number of rows both on Metadata and Data tabs and react accordingly.
HTH |
|