Hi
I have a error when I execute the following sql sentence:

SELECT 
(SELECT DESCRIP_ART FROM GACLASIF WHERE COD = X.FAM AND GACLATIP_COD = 'FAM') FAMILIA ,X.I_VENTA_FAC
 FROM 
 
 ( SELECT GAARTCLASI_GACLASIF(A.EMPGRUPO_COD, A.GAART_COD, 'FAM') FAM, NVL(SUM(A.I_NETOEMP),0) AS I_VENTA_FAC FROM GGALBLINV A 
 WHERE A.GGCLIPR_COD IN (SELECT C.COD FROM GGCLIPR C WHERE C.GVAGENTE_COD = '10' AND C.TIP_VC = 'V') 
 AND A.TIP_vC = 'V' AND A.N_FACTURA IS NOT NULL AND A.F_ALBARAN BETWEEN SYSDATE-365 AND  
 SYSDATE AND A.EMPGRUPO_COD = 'DIS' GROUP BY GAARTCLASI_GACLASIF(A.EMPGRUPO_COD, A.GAART_COD, 'FAM') 
 ORDER BY 2 DESC ) X 
WHERE ROWNUM < 10

I test that sentence at Oracle SQL Client and it works OK, but when I execute this sentence from drupal I have the following error:
General error: 923 OCIStmtExecute: ORA-00923:

This error is because doesn't find FROM word (ext\pdo_oci\oci_statement.c:148)

I use oracle for a external database. If I execute this sentence using OCI (without PDO) works

Any idea?

Comments

aaaristo’s picture

Category: support » bug
Status: Active » Needs work

the group by handler... is horrible...
try using $conn->oracleQuery if is a custom module meanwhile..

aaaristo’s picture

Status: Needs work » Closed (duplicate)