×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 03 Apr 2013 12:09, rob@xxxxxxxxx wrote:
OMG. I thought the comment was only a comment for the rest of the
line, like it is for embedded SQL in RPG.
The dash dash as comment *is* only a comment "for the rest of the
line" just as "it is for embedded SQL in RPG." The actual issue is with
what the input-method is for the SQL statement; what is sent from the
user interface to the SQL parser\syntax-checker.
If the input method is fixed-length record input, then the /line/ is
well-defined. This is how embedded SQL in RPG from a Source Physical
File works; i.e. a fixed-length database record, with the data from
field SRCDTA for each row. Any --comment must fit in a row, and has no
effect on following rows.
If the input method is record-defined stream data [e.g. <CRLF>
honored], then the /line/ is well-defined. Any --comment is implicitly
stopped when <CRLF> is encountered.
But when the input method is purely a stream [i.e. with no record
delimiter; no EOR; or possibly by request to the SQL that all control
characters should be ignored], then the entire remainder of the stream
is in-effect the "rest of the line". This is the way the interactive
STRSQL interface works. What appear as newlines are not new lines, they
are just a continuation of the stream, with any spaces from the end of
the prior non-blank giving an *appearance* of data moved to [what looks
like] a new line. Especially deceiving, per F15="Split line" offered as
a feature.
Thus one needs to be fully aware of the interface being used; i.e.
how the interface treats its input, to avoid experiencing possibly
disturbing\incorrect results or non-functional [usu. syntax error]
results :-( That, *or* instead just be sure to *always* use slash
asterisk "/*" [paired with the asterisk slash "*/"] when commenting
versus using the dash dash "--" commenting, whenever that commenting is
to be done within a SQL statement.
As an Amazon Associate we earn from qualifying purchases.