Article View: borland.public.interbase.sql
Article #323Re: debug stored procedures
From: Isaac
Date: Tue, 20 May 2008 13:47
Date: Tue, 20 May 2008 13:47
42 lines
2546 bytes
2546 bytes
Bill Todd [TeamB] wrote:
> Your last post in this thread is:
>
> "sql server has isnull() function but interbase did not has it , I
> really did not want to use alot of if to test for null I hope also not
> to us UDF!!"
>
> which I understood to mean that you are looking for a way to do what
> ISNULL does in Transact SQL. In my reply I provided the alternatives
> that are available in IB. Now you are telling us that COALESCE gave you
> an error but you do not show us the code that caused the error. No one
> here can read your mind. If you want help you must provide enough
> information.
>
I am crying here, always misunderstand me
here is my last post again:
update:
I get this error:
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements.
Dynamic SQL Error.
expression evaluation not supported.
when I try to execute this SQL
select COALESCE(sum(QTY),0), COALESCE(sum(QTY * COST_PRICE),0) from
purchase_inv_item
left outer join purchase_inv on (purchase_inv_item.pur_code =
purchase_inv.pur_code)
where (purchase_inv.purch_return <> 1)
and (PURCHASE_INV_ITEM.item_code = :p_new_item_code)
and (PURCHASE_INV_ITEM.inv_code = :p_new_inv_code)
into :pur_sum_qty, :pur_sum_cost;
I successfully compiled the procedure but I get the error at run time !!
I also tried to make like this sum(COALESCE(QTY,0)) but I was not able
to even compile
please advice
Technical Details
Message-ID:
<4832d6a0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mailReferences:
<4831f162@newsgroups.borland.com> <4831f280@newsgroups.borland.com> <4831f42a@newsgroups.borland.com> <483201d3$1@newsgroups.borland.com> <48321ed5$1@newsgroups.borland.com> <4832c323@newsgroups.borland.com> <4832cc01@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,8feff649be448d0 X-Google-Attributes: gid114a0e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 20 May 2008 16:47:55 +0300 From: Isaac <no@no.com> User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: borland.public.interbase.sql Subject: Re: debug stored procedures References: <4831f162@newsgroups.borland.com> <4831f280@newsgroups.borland.com> <4831f42a@newsgroups.borland.com> <483201d3$1@newsgroups.borland.com> <48321ed5$1@newsgroups.borland.com> <4832c323@newsgroups.borland.com> <4832cc01@newsgroups.borland.com> In-Reply-To: <4832cc01@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 41.234.198.61 Message-ID: <4832d6a0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1211291296 41.234.198.61 (20 May 2008 06:48:16 -0700) Lines: 43 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mail