Doug Howell
2013-03-28 16:32:51 UTC
I have a SQL syntax question:
SELECT DISTINCT SUBSTRING(PZPPN,1,7)AS "Parent",SUBSTRING(CMDESC,2,24)AS "Description",PZSEQ AS "SeqNum",PZCPN AS "Component",(PZQTY/(10^PSDCC)) AS "Percent"
FROM AS400.S102BAFE.AADAT10.DE120M DE120M, AS400.S102BAFE.AADAT10.DE100M DE100M
WHERE PZPPN LIKE '%000/%' AND PEFOUT='0' AND PZPPN=IZPN AND PSPLNT='100'
ORDER BY Parent,SeqNum
I get the following error:
Msg 402, Level 16, State 1, Line 1
The data types int and numeric are incompatible in the '^' operator.
What am I doing wrong?
Doug
SELECT DISTINCT SUBSTRING(PZPPN,1,7)AS "Parent",SUBSTRING(CMDESC,2,24)AS "Description",PZSEQ AS "SeqNum",PZCPN AS "Component",(PZQTY/(10^PSDCC)) AS "Percent"
FROM AS400.S102BAFE.AADAT10.DE120M DE120M, AS400.S102BAFE.AADAT10.DE100M DE100M
WHERE PZPPN LIKE '%000/%' AND PEFOUT='0' AND PZPPN=IZPN AND PSPLNT='100'
ORDER BY Parent,SeqNum
I get the following error:
Msg 402, Level 16, State 1, Line 1
The data types int and numeric are incompatible in the '^' operator.
What am I doing wrong?
Doug