Very good advise, sadly, I can not reproduce the error. But it will be usefull when/if the problem returns.

TAllen@xxxxxxxxxxxx wrote:

It is always helpful to set the SHOWSQL variable to "YES" so you can see
the actual SQL statement being executed. Often times seeing the statement
will help track down the syntax error. Or you can paste the statement into
iNav or your favorite SQL client for debugging.

Thanks,
Todd Allen
EDPS
Electronic Data Processing Services
tallen@xxxxxxxxxxxx



"Raul A. Jager W." <raul@xxxxxxxxxx> To Sent by: Web Enabling the AS400 / iSeries web400-bounces@mi <web400@xxxxxxxxxxxx> drange.com cc Subject 2010-02-16 11:02 [WEB400] SQLSTATE 58004 Please respond to Web Enabling the AS400 / iSeries <web400@midrange. com>



I have a NetData macro (source below) that was working fine during
several years, sudently, yesterday it failed with a SQLSTATE 58004 in
function listAsie(). The cause seems to be in the "WHERE" clause,
eliminating the and it works, eliminating the or also works (but the
report is not what I need).
I also tried to replace $(REMOTE_USER) with a constant, same error.
Temporary solution: I replaced the physical file with a view, and
eliminated the and.
Today I restored the original version: surprise, it works!!!
I can not reproduce the error, it went by itself, it may return when I
least want it.

______________________________________________________________________________________________________

%{ Muestra Mis asientos %}
%define REMOTE_USER = %ENVVAR

%FUNCTION(DTW_SQL) listAsie() {
SELECT fasie, nasie, situa, tasie, nasiev, b.f7(fasie) as f, fh_crea,
culp_act, fh_act, tasa, impt4
FROM ed.asie_fn
WHERE (culp_crea = '$(REMOTE_USER)' or culp_act = '$(REMOTE_USER)')
and situa <= '2'
ORDER by fasie, nasie
%MESSAGE{ 100:
"<tr><td colspan=""5"">No hay asientos pendientes de
$(REMOTE_USER) </td></tr>": continue %}
%REPORT{ <table border="1" cellspacing="0"><thead>
<caption><h1>Asientos a Actualizar de $(REMOTE_USER)</h1></caption>
<tr>
<th>Nro.</th>
<th>Fecha</th>
<th>Fecha y Hora Carga</th>
<th>Tipo</th>
<th>Nro.</th>
<th>Usuario</th>
<th>Fecha-Hora Modif</th>
<th>Dolar</th>
<th>Importe</th>
<th>Sit.</th>
</tr></thead>
<tbody>
%ROW{ <tr>
<td><a
href="../acc28a.asp?fa=$(V_fasie)&na=$(V_nasie)">$(V_nasie)</a></td>
<td><a
href="../acc19a.asp?fa=$(V_fasie)&na=$(V_nasie)">$
(V_f)</a>&nbsp;&nbsp;</td>
<td>&nbsp;&nbsp;@DTW_rSUBSTR(V_fh_crea, "1", "19")</td>
<td align="right">$(V_tasie)</td>
<td align="right">$(V_nasiev)</td>
<td>$(V_culp_act)</td>
<td>&nbsp;&nbsp;@DTW_rSUBSTR(V_fh_act, "1", "19")</td>
<td align="right">&nbsp;&nbsp;$(V_tasa)</td>
<td align="right">&nbsp;&nbsp;&nbsp;$(V_impt4)</td>
<td>&nbsp;&nbsp;$(V_situa)</td>
</tr>%}
</tbody></table>%}
%}

%{ ----- INICIO DEL HTML --------- %}

%HTML(html){
<html><head>
<title>Mis Asientos</title>
</head>
<body>
@listAsie( )
<br>
<a href="../acc19_new.asp">Crear asiento nuevo</a>
<hr>
</body></html>
%}




This communication and any transmitted documents are intended to be confidential. If there is a problem with this transmission, please contact the sender. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.