Re: Opinions on approach, please...
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 May 2008 00:42:31 +1200
<docdwarf@xxxxxxxxx> wrote in message news:g1m513$p0$1@xxxxxxxxxxxxxxxxxxxx
In article <6a7ffoF343euvU1@xxxxxxxxxxxxxxxxxx>,
Pete Dashwood <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"Frederico Fonseca" <real-email-in-msg-spam@xxxxxxxxx> wrote in message
news:7bos345far6d9sglmuc59ga9mfdlu1qe4n@xxxxxxxxxx
[snip]
Take in consideration that dependign on how you
go on the dynamic sql route, you will not be able to do it exactly as
follows.
move "SELECT TABNAME FROM SYSCAT.TABLES
- " ORDER BY 1
"ORDER BY 1" ? I don't understand this.
<http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLJ,GGLJ:2006-39,GGLJ:en&q=%22order+by+1%22>
(It is not the way I would, when given the choice, code things... but I
seem to recall seeing something like this in code slapped together by some
Peat, Marwick folks around 1987 or so. ORDER BY (numeric) is sorting on
the column(s) SELECTed in numeric sequence. From
http://www.techonthenet.com/sql/order_by.php :
--begin quoted text:
You can also sort by relative position in the result set, where the first
field in the result set is 1. The next field is 2, and so on.
SELECT supplier_city
FROM suppliers
WHERE supplier_name = 'IBM'
ORDER BY 1 DESC;
This would return all records sorted by the supplier_city field in
descending order, since the supplier_city field is in position #1 in the
result set.
--end quoted text)
DD
Thanks, Doc :-)
Pete.
--
"I used to write COBOL...now I can do anything."
.
- Follow-Ups:
- Re: Opinions on approach, please...
- From: Frederico Fonseca
- Re: Opinions on approach, please...
- References:
- Opinions on approach, please...
- From: Pete Dashwood
- Re: Opinions on approach, please...
- From: Pete Dashwood
- Re: Opinions on approach, please...
- From: Frederico Fonseca
- Re: Opinions on approach, please...
- From: Pete Dashwood
- Re: Opinions on approach, please...
- From:
- Opinions on approach, please...
- Prev by Date: Re: Opinions on approach, please...
- Next by Date: Re: Opinions on approach, please...
- Previous by thread: Re: Opinions on approach, please...
- Next by thread: Re: Opinions on approach, please...
- Index(es):