Welcome, Guest
Guest Settings
Help

Thread: Bad BLR - Invalid Stream


This question is answered.


Permlink Replies: 3 - Last Post: Mar 8, 2017 10:38 AM Last Post By: Jeff Overcash (... Threads: [ Previous | Next ]
Melissa Torn

Posts: 81
Registered: 4/30/09
Bad BLR - Invalid Stream  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 6, 2017 11:30 PM
SELECT ITEMNO,
COALESCE(SUM(INCOME),0),
COALESCE(SUM(OUTGO),0),
COALESCE(SUM(INCOME-OUTGO),0)
FROM ITEMMOVEMENTS
GROUP BY ITEMNO
With above Query i am getting
Bad BLR-Invalid Stream error msg.

If i remove COALESCE there is no error msg.
Below query works.
SELECT ITEMNO,SUM(INCOME),
SUM(OUTGO),SUM(INCOME-OUTGO)
FROM ITEMMOVEMENTS
GROUP BY ITEMNO

What is wrong ?

Thank You
Jeff Overcash (...

Posts: 1,313
Registered: 9/23/99
Re: Bad BLR - Invalid Stream
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 7, 2017 10:24 AM   in response to: Melissa Torn in response to: Melissa Torn
Melissa Torn wrote:
SELECT ITEMNO,
COALESCE(SUM(INCOME),0),
COALESCE(SUM(OUTGO),0),
COALESCE(SUM(INCOME-OUTGO),0)
FROM ITEMMOVEMENTS
GROUP BY ITEMNO
With above Query i am getting
Bad BLR-Invalid Stream error msg.

If i remove COALESCE there is no error msg.
Below query works.
SELECT ITEMNO,SUM(INCOME),
SUM(OUTGO),SUM(INCOME-OUTGO)
FROM ITEMMOVEMENTS
GROUP BY ITEMNO

What is wrong ?

Thank You

Not sure what is wrong other than an IB bug, but what happens if you invert it

SELECT ITEMNO,
SUM(COALESCE(INCOME,0)),
SUM(COALESCE(OUTGO,0)),
SUM(COALESCE(INCOME-OUTGO,0))
FROM ITEMMOVEMENTS
GROUP BY ITEMNO

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Melissa Torn

Posts: 81
Registered: 4/30/09
Re: Bad BLR - Invalid Stream  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2017 2:54 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Thank you SO MUCH Jeff,
Your suggestion works PERFECT

Thank You
Jeff Overcash (...

Posts: 1,313
Registered: 9/23/99
Re: Bad BLR - Invalid Stream  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2017 10:38 AM   in response to: Melissa Torn in response to: Melissa Torn
Melissa Torn wrote:
Thank you SO MUCH Jeff,
Your suggestion works PERFECT

Thank You

I couldn't reproduce it on the Employee DB, but if you have a reproducible case
put it into Quality Portal. Your syntax should have worked so this is a bug (I
tested on XE3 SP 4).

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02