Haggis
9th August 2002, 13:18
Hi

We recently upgraded our porting set. Since doing that we have had a few errors with sessions. I try to compile a customized program script and I get the error:

Error SQL: Degree mismatch in reference redicate ('tdsls401')

This session used to work fine. I am guessing it not longer like the sql in the script?

Has anyone had this problem, and could anyone advise me a solution?

shah_bs
10th August 2002, 03:14
This occurs usually with the 'refers to' sub-clause of the select. The syntax has been tightened up in the new porting set, which is a good thing. The solution is to re-code the clause suitably.

I am not at work right now so I cannot give a specific example, but here is the concept:

say a Table A has primary key with FieldA and FieldB.

and Table B has FieldA and FieldB as attributes.

Then when we say:


select ...
from tableA, tableB
where ...
and tableB.fieldA refers to tableA


the compiler will give an error because refers to is intended for entire key.

One solution to the above would be:


select ...
from tableA, tableB
where ...
and tableA._index1 = {tableB.fieldA, tableB.fieldB}