Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Need help on SELECT statement
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Need help on SELECT statement
 Login/Join
 
Member
posted
Hi,

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.


Thanks,
Rajesh

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 15 | Registered: March 14, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1617 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
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
 
Posts: 380 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Need help on SELECT statement

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.