I have requirement like: Need to arrange all rows in table in acsending order and fetch the first row only.
As I am new to Data migrator, Could anyone please help me how to use SELECT object here.
RajeshThis message has been edited. Last edited by: FP Mod Chuck,
Windows, All Outputs
If this is for DataMigrator, you should post this question in the iWay Software Product Forum. If this is a WebFOCUS question, you need to use BY HIGHEST 1 FIELDNAME in your code.
WebFOCUS 8204, Unix, Windows
By "arrange all rows in table in ascending order" do you mean by the key or some other column? And why do you need to do that if you only want the first one? You can get the first (i.e.: lowest valued) row for a column from a WHERE condition with a sub-select.
For example using the DataMigrator sample table dminv to get the row with the least expensive item(s). Add the table to a flow, select the columns you want, then right click on the SQL object and click on the Conditions tab. Then click on the Functions tab and expand "SQL Operators" and click on the last one (SELECT lookup_result...
For LOOKUP_MFD select the same table, for lookup_result type SQ.PRICE then add the condition as shown below.
(SELECT MIN( SQ.PRICE ) FROM ibisamp.dminv SQ ) = T1.PRICE
|Powered by Social Strata|