|
Posted by Crazy Cat on 02/01/06 18:37
Crazy Cat wrote:
> Hi, whenever the underlying query being called by EXEC in the following
> has an empty result set I get the following error -- Invalid Data for
> 'Numeric' when EXEC returns empty row. However if I call the query
> without using REPLACE (which I'm forced to do, because openquery does
> not allow variables), I get just an empty result set. Whenever the
> underlying query returns a non-empty result set, the code works without
> error (regardless of wether there are nulls in the numeric column).
code deleted to save space ...
>
> Is there anyway to prevent this error?
>
> Thanks,
>
> Crazy
Found the problem -- apparently one of the keys was of type numeric and
I wasn't converting it to varchar before selecting it -- funny it
worked when the result set was non-empty.
Thanks,
Crazy
[Back to original message]
|