Although I have many materials on the subject, nothing has even helped me resolve it.
I'm trying to make a simple query in an Oracle database and I get an error, follow the error.
OCIStmtExecute: ORA-01843: not a valid month
Follow my query.
try {
$linha = '';
$sql = "SELECT * FROM SGT.VW_INFOGED";
$p_sql = Conexao::conexaoOracle()->prepare($sql);
$execute = $p_sql->execute();
if ($execute) {
$linha = $p_sql->fetchAll(PDO::FETCH_ASSOC);
print_r($linha);
} else {
print_r($p_sql->errorInfo());
return 'ERRO... CONTATE O SUPORTE';
}
} catch (Exception $ex) {
echo "ERRRO" . $ex . "";
}
View structure
Nome Nulo Tipo
--------------------- -------- ------------
ID_NOTA NOT NULL VARCHAR2(27)
NUMERO_NOTA VARCHAR2(10)
REMETENTE_NOME VARCHAR2(50)
REMETENTE_CNPJ VARCHAR2(14)
DESTINATARIO_NOME VARCHAR2(50)
DESTINATARIO_CNPJ VARCHAR2(14)
SERIE_NOTA VARCHAR2(3)
TERCEIRO_NOME VARCHAR2(50)
MOTORISTA VARCHAR2(80)
ROMANEIO VARCHAR2(10)
VALOR_MERCADORIA NUMBER(14,2)
VALOR_FRETE NUMBER(14,2)
ENDERECO_DESTINATARIO VARCHAR2(50)
REGIAO VARCHAR2(50)