×
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.
First l World use the week_ISO Funktion instand of the week according the ISO guidelines.Futter I'usw the varchar_FormAT Funktion to also get the associated year.VARCHAR_FORMAT (timestamp,'IYYY/IWW)Birgitta
Von meinem Samsung Gerät gesendet.
-------- Ursprüngliche Nachricht --------
Von: Booth Martin <booth@xxxxxxxxxxxx>
Datum: 20.02.2016 22:51 (GMT+01:00)
An: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
Betreff: Re: rpg Embedded SQL: date/week order by
Here is the prepared statement I would like to use. It does not
compile. It will compile & run if I order by week, but that gives me
the issue of this thread.
'select'
+ ' Week(Dec((19000000 + XDTE), 8, 0) concat ''000000''),'
+ ' XLOC, XAQT, XORD, XQTY'
+ ' from FILEA'
+ ' join FILEB on XITM = XITM2 and XDTE = XDTE2'
+ ' where XITM = ?'
+ ' group by Week(Dec((19000000 + XDTE), 8, 0)'
+ ' concat ''000000'')'
+ ' order by XDTE desc';
On 2/20/2016 3:31 PM, Alan Shore wrote:
I am not too sure what poibt you are trying to maje but i belive you have to use the year of the date as well
Maybe if you posted the sql it might help
As an Amazon Associate we earn from qualifying purchases.