×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
You have a couple options - do you want to create a table with the
results? Or do you need to display them?
If a result table, and you are at 7.1, you can use the new RUNSQL
command - it cannot do SELECTs directly.
With an older release and up, you can create a source member and use
RUNSQLSTM.
I suggest forgetting about Query/400 - unless it's an already-existing
one - and use QM queries. Those can have SQL statements - even SELECT.
You can even take your Query/400 and convert it to a QM query, then add
the distinct to the result there.
CRTSRCPF YOURLIB/QQMQRYSRC RCDLEN(91)
RTVQMQRY QRY400NAME YOURLIB/QQMQRYSRC (something like that - prompt
the command)
Check the result for what you want - there are some odd things when
converting to QMQRYs.
Open the source member you get and see a SELECT statement - add the
DISTINCT as you need.
CRTQMQRY over that source member.
STRQMQRY to run it in CL - ba-da-boom!
HTH
Vern
On 7/2/2013 8:30 AM, Hoteltravelfundotcom wrote:
I have a ad hoc process, where I can make use of the DISTINCT feature of SQL
THe CL would first run query400 then I need the results as
Distinct.
Can you do that SQL statement in a CL?
As an Amazon Associate we earn from qualifying purchases.