|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
problem with date function in test environment |
« View previous topic :: View next topic » |
Author |
Message
|
credospirit |
Posted: Wed Dec 13, 2017 11:06 pm Post subject: problem with date function in test environment |
|
|
Newbie
Joined: 13 Dec 2017 Posts: 1
|
Hi guys,
I have got a different behavior between dev environment ( IIB 10.0.0.7) and test environment ( IIB 10.0.0.3).
I write this code to compare 3 date and take the max date. It work very well in my dev environment but when i deploy to test, he didn't work. If somebody have idea to fix this , i will be very glad
Code: |
CREATE FUNCTION maxDate(IN dateOne DATE, IN dateTwo DATE, IN dateThree DATE)
RETURNS DATE
BEGIN
DECLARE result DATE;
IF (dateOne >= dateTwo AND dateOne >= dateThree) OR (dateOne >= dateTwo AND dateThree <= dateTwo ) THEN
SET result = dateOne;
ELSEIF (dateTwo >= dateThree AND dateTwo >= dateOne) OR (dateTwo >= dateThree AND dateOne <= dateThree) THEN
SET result = dateTwo;
ELSEIF (dateThree >= dateOne AND dateThree >= dateTwo) OR (dateThree >= dateOne AND dateTwo <= dateOne) THEN
SET result = dateThree;
END IF;
RETURN result;
END; |
|
|
Back to top |
|
 |
abhi_thri |
Posted: Fri Dec 15, 2017 1:31 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
Hi...first of all having different broker versions across the environment is never a good idea as you've already seen that a code developed on a higher fixpack level may not work at a lower one.
What you could do is collect user traces at both Dev & Test and compare the trace to detect any difference, along with that go through the 'Problems fixed' list between 10.0.0.3 and 10.0.0.7 fixpack and see. |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Dec 15, 2017 10:55 am Post subject: Re: problem with date function in test environment |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
credospirit wrote: |
... when i deploy to test, he didn't work. |
Describe in more detail what "he didn't work" means.
credospirit wrote: |
Code: |
-- ...
IF (dateOne >= dateTwo AND dateOne >= dateThree) OR (dateOne >= dateTwo AND dateThree <= dateTwo ) THEN
-- ...
ELSEIF (dateTwo >= dateThree AND dateTwo >= dateOne) OR (dateTwo >= dateThree AND dateOne <= dateThree) THEN
-- ...
ELSEIF (dateThree >= dateOne AND dateThree >= dateTwo) OR (dateThree >= dateOne AND dateTwo <= dateOne) THEN
-- ... |
|
The right hand side of the OR clauses are redundant; it is impossible for the right hand side to be TRUE when the left hand side is FALSE. The last IF clause is also redundant; it is impossible for all three IF clauses to be FALSE. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|