How can I get more information about the SQL warning in PHP?
I'm trying to access an Oracle database in PHP, but it throws the following error:
Warning: oci_execute(): in PATH_TO_FILE.php on line XXX
without further information ...
I am doing the following on this line ...
oci_free_statement($stmt);
$consulta="LOAD DATA CONCURRENT LOCAL INFILE 'files/data.csv'
INTO TABLE PRUEBA_SMS FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\n'
(@FECHA,NODO,SERVICIO,VALOR)
SET FECHAHORAINF=TO_DATE(@FECHA,'DD/MM/YYYY hh24:mi:ss')";
$stmt=oci_parse($conexion, $consulta);
oci_execute($stmt);
Is there a way to find out more about this warning and why it fails?
UPDATE . Well, after researching, I think the problem is that the procedure is LOAD DATA INFILE
incompatible with the SQL database, only if it was MySQL. I tried to run this command in Oracle SQL Plus program and it generates the following error ...
SP2-0734: unknown command beginning "LOAD DATA ... " Rest of the line ignored
Hello!
source to share
For Oracle try using SQL-Loader [sqlldr]
You can find useful examples here (and all over the internet) http://docs.oracle.com/cd/B10501_01/text.920/a96518/aload.htm
Saludos.
source to share