Comments in Embedded SQL files??? Comments in Embedded SQL files??? boaconstrictor (Programmer) (OP) 16 Oct 02 10:34 Hy,does anybody know how I can insert comments into Embedded SQL files? Is it possible at all?kind regards boaconstrictor RE: Comments in Embedded SQL files??? rycamor (Programmer) 16 Oct 02 12:39 I'm not quite sure why a comment in embedded SQL would be different from a comment in regular SQL:(example SQL block:)CREATE SEQUENCE "id" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;-- this is a commentSELECT * FROM table_1;-- here are a few comments-- comment1-- comment2SELECT * FROM table_1-- you can even have comments in the-- middle of an SQL statement, as long-- as you put them on their own linesWHERE id > 12;Or do you mean the SQL COMMENT syntax, where you can create a comment on a table, view, whatever, to be stored for later use? This should also work just fine in embedded SQL:http://www.postgresql.org/idocs/index.php?sql-comment.html -------------------------------------------Big Brother: "War is Peace" -- Big Business: "Trust is Suspicion"(http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html) RE: Comments in Embedded SQL files??? raisin96 (Programmer) 16 Oct 02 21:44 Hi,If you are embedding it in the C language, you could also used the '/* */' comments...e.g.EXEC SQL SELECT fname,lname /* SELECT .... */ INTO :hv_Fname,:hv_Lname FROM EMPLOYEE /* EMPLOYEE TABLE */ WHERE idno=:hv_IDNo;Good Luck! RE: Comments in Embedded SQL files??? boaconstrictor (Programmer) (OP) 17 Oct 02 07:46 Thanks for your answers!I found out now what was wrong. The token "--" can be used in .pgc-files, but if you precompile this to a c-program, it produces "--" tokens as well in the c-file. But in C this is an unknown token. So if you use this token, you need to swap them into "/*" tokens. Hence it is strongly recommended to use the standard C token "/*" and "*/" for comments inside the .pgc files.But there is still a considerable issue:The new C99 standard supports also the token "//" to make comments for one line. But the ECPG program doesn't recognise it as a comment token! This could be a pitfall!