Hi all,

I have a query which runs fine on our dev db, but when the query is run on the live box i am getting the following error:

ORA-22813: operand value exceeds system limits

The query is as follows:

SELECT ap.HOUSENUMBERNAME, ap.POSTCODE, a.BLOCKPROMO, a.BUSINESSIND from (
SELECT
PKG_OSAP_SUPPORT.getAddressString(a.organisation_name, a.department,
a.po_box_number, a.sub_building_name, a.building_name, a.building_number,
a.dep_thoroughfare, a.thoroughfare, a.dbl_dep_locality, a.dep_locality) || ',' |
| a.post_town as housenumbername,
a.postcode
FROM TARGETAREA@EAAPLink t0 , ADDRESS_POINT_001 a
WHERE t0.TARGETAREAID = 'c84a7c650a051e2200624da79f1bcb99'
AND sdo_relate(a.GEOMETRY, t0.SHAPE, 'mask=anyinteract querytype=window') = 'TRU
E') ap
LEFT OUTER JOIN ADDRESS@EAAPLink a ON AP.HOUSENUMBERNAME = A.HOUSENUMBERNAME AND
AP.POSTCODE = A.POSTCODE

The error i get is:

SQL> @prob.sql
11 ;
FROM TARGETAREA@EAAPLink t0 , ADDRESS_POINT_001 a
*
ERROR at line 7:
ORA-22813: operand value exceeds system limits

I checked all config parameters on both dbs. Both are the same. The only difference is TARGETAREA@EAAPLink (which is a table in a different db and is used as a db link) has ~1000 rows in the dev db and ~5000 rows in the live db. Can this be the cause of the failure? and if so what can i do to rectify the error?

Thanks in advance,
Chucks