Hi,
I get the following error in the query
SQL0415N The data types of corresponding columns are not compatible in
a
fullselect that includes a set operator or in the multiple rows of a
VALUES
clause of an INSERT or fullselect. SQLSTATE=42825
How can i specify a combination of values in the IN phrase ? I need a
combination as
I need to check against valid combinations of ('test',1)
('test1,2),('te st3',3)
I cant figure out how to specify these in the IN phrase.
If i give 2 IN phrases a.nme in (''test','test1 ','test3') and a.seq_num
IN (1,2,3) it will not give me the correct result cause the a.nme and
a.seq_num are the primary keys and i need to filter out the
combination.
SELECT
a.name,
a.seq_num
FROM
db2test.a
(
SELECT
num,
seq_num,
yr
FROM
db2test.b
WHERE
p_num= '100' AND
p_seq_num=1 AND
p_bgt_yr='2006'
) as c
WHERE
a.num=c.num AND
a.seq_num=c.seq _num AND
a.yr=c.yr AND
(a.nme,a.seq_nu m) IN ('test',1)
GROUP BY
nme,seq_num
I get the following error in the query
SQL0415N The data types of corresponding columns are not compatible in
a
fullselect that includes a set operator or in the multiple rows of a
VALUES
clause of an INSERT or fullselect. SQLSTATE=42825
How can i specify a combination of values in the IN phrase ? I need a
combination as
I need to check against valid combinations of ('test',1)
('test1,2),('te st3',3)
I cant figure out how to specify these in the IN phrase.
If i give 2 IN phrases a.nme in (''test','test1 ','test3') and a.seq_num
IN (1,2,3) it will not give me the correct result cause the a.nme and
a.seq_num are the primary keys and i need to filter out the
combination.
SELECT
a.name,
a.seq_num
FROM
db2test.a
(
SELECT
num,
seq_num,
yr
FROM
db2test.b
WHERE
p_num= '100' AND
p_seq_num=1 AND
p_bgt_yr='2006'
) as c
WHERE
a.num=c.num AND
a.seq_num=c.seq _num AND
a.yr=c.yr AND
(a.nme,a.seq_nu m) IN ('test',1)
GROUP BY
nme,seq_num
Comment