Subject | Re: [firebird-support] Re: Still UDF problem. |
---|---|
Author | Helen Borrie |
Post date | 2003-06-26T14:28:41Z |
At 12:41 PM 26/06/2003 +0000, you wrote:
recognise UDF calls, or because it is having trouble dealing with
exceptions arising from errors in your SQL. You say you guess there is no
syntax error, but this statement is 1) ambiguous and 2) does not name the
expression fields. (If you are using InterBase, not Firebird, then IB is
more tolerant of ambiguous join statements...)
Since, as you say, the statement works if you don't use the UDFs then my
next guess is that the unnamed output fields are probably causing a
crash. They shouldn't; they should cause an exception. So maybe your
.net driver doesn't manage exceptions.
Try to deal with one problem at a time. Go back to your statement and
reconstruct it so that the syntax is clean. I'm excluding all your bits
and pieces to show the right way to present these statements:
select
categoryid,
sNvl(xyzcatname, '') as xyxCATEGNAME
from tblcategories ;
select
sNvl(tp.name, '') as TPNAME,
sNvl(tp.description, '') as TPDESCRIPTION,
sNvl(tp.SKU, '') as TPSKU,
tp.prodid,
tp.pprice,
sNvl(tp.pimgurl, '') as TPPIMGURL
FROM tblproducts tp
WHERE EXISTS (
select 1 from tblxyz tx
where tx.prodid = tp.prodid)
As this isn't a .NET forum, you can help us by giving us your actual SQL,
not your concatenated, ASP-friendly stuff.
Helen
>No, that isn't the problem. I just forgot to remove the double quoteYou could be losing the connection because your .NET driver doesn't
>(") while pasting the code. I've already mentioned, the syntax is
>fine. Just the problem related to UDF. 'Coz when I am going to use
>it, it gives the problem. Plz help me.
recognise UDF calls, or because it is having trouble dealing with
exceptions arising from errors in your SQL. You say you guess there is no
syntax error, but this statement is 1) ambiguous and 2) does not name the
expression fields. (If you are using InterBase, not Firebird, then IB is
more tolerant of ambiguous join statements...)
Since, as you say, the statement works if you don't use the UDFs then my
next guess is that the unnamed output fields are probably causing a
crash. They shouldn't; they should cause an exception. So maybe your
.net driver doesn't manage exceptions.
Try to deal with one problem at a time. Go back to your statement and
reconstruct it so that the syntax is clean. I'm excluding all your bits
and pieces to show the right way to present these statements:
select
categoryid,
sNvl(xyzcatname, '') as xyxCATEGNAME
from tblcategories ;
select
sNvl(tp.name, '') as TPNAME,
sNvl(tp.description, '') as TPDESCRIPTION,
sNvl(tp.SKU, '') as TPSKU,
tp.prodid,
tp.pprice,
sNvl(tp.pimgurl, '') as TPPIMGURL
FROM tblproducts tp
WHERE EXISTS (
select 1 from tblxyz tx
where tx.prodid = tp.prodid)
As this isn't a .NET forum, you can help us by giving us your actual SQL,
not your concatenated, ASP-friendly stuff.
Helen