Maximum and Minimum JOBNO in a project
Moderators: chulett, rschirm, roy
Maximum and Minimum JOBNO in a project
I am trying to find the minimum and maxium JOBNO is a project
SELECT MAX(JOBNO) FROM DS_JOBS;
Returns 999
But the actual number i was expecting was 2677 ??
Thanking you all in advance
SELECT MAX(JOBNO) FROM DS_JOBS;
Returns 999
But the actual number i was expecting was 2677 ??
Thanking you all in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That's because JOBNO has a data type of VarChar. Try:
or
Code: Select all
SELECT MAX(CAST(JOBNO AS INTEGER)) FROM DS_JOBS;
Code: Select all
LIST DS_JOBS MAX JOBNO DET.SUP
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 108
- Joined: Wed Jul 28, 2004 7:15 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
All the UniVerse manuals.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: