Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Macro substitution in Embedded SQL?
Is this idea possible?
In .pc file:
#define DEFAULT_STATUS 1
...
EXEC SQL
SELECT NVL(STATUS, DEFAULT_STATUS)
FROM STATUS_TABLE WHERE ID = :ID;
In the code generated PRO*C, the corresponding sql becomes SELECT NVL(STATUS, 1)
FROM STATUS_TABLE WHERE ID = :ID
(i.e., to DEFAULT_STATUS expand to 1 after PRO*C processing)
Actually, I'm researching the compilation of some old PRO*C source code. I ran strings on the generated executable and found that it seems some sort of macro substitution like this occurs. There's no Makefile. And I can't find any documentation about similar function. Received on Mon Jul 23 2007 - 01:27:52 CDT