Thread: Invalid operator for data type.
10-23-05, 04:46 #1Registered User
- Join Date
- Aug 2005
- Sharjah, UAE
Unanswered: Invalid operator for data type.
Kudos to y'all experts out there. I kinda needed your help. I'm trying to run a query...
SELECT a.AUF_POS AS Pos, c.ZL_STR AS Panel, a.POS_TEXT AS Description, a.BREITE AS W1, a.HOEHE AS H1, a.BREITE2 AS W2, a.HOEHE2 AS H2, SUM(b.ANZ) AS Qty, SUM(b.LIEFER_ANZ) AS Dlvd, SUM(b.RG_ANZ) AS Inv, (a.BREITE*a.HOEHE/CAST(1000000 AS NUMERIC)) AS UnitSQM, (a.BREITE*a.HOEHE*SUM(b.ANZ)/CAST(1000000 AS NUMERIC)) as TotPosSQM FROM liorder..LIORDER.AUF_POS a INNER JOIN liorder..LIORDER.AUF_STAT b ON a.AUF_NR = b.AUF_NR AND a.AUF_POS = b.AUF_POS INNER JOIN liorder..LIORDER.AUF_TEXT c ON a.AUF_NR = c.AUF_NR AND b.AUF_POS = c.AUF_POS WHERE (c.ZL_MOD = 0) AND (b.AUF_NR = '86260') GROUP BY a.AUF_POS, a.POS_TEXT, a.BREITE, a.BREITE2, a.HOEHE, a.HOEHE2, a.SFORM_NR, c.ZL_STR
10-23-05, 17:09 #2Registered User
- Join Date
- May 2002
Its going to be difficult for us to help without the DDL. Your query does alot of aggregrations (i.e. sum/avg/etc), thus you'd want to ensure that the column datatype is numeric.--