Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Macro substitution in Embedded SQL?

Macro substitution in Embedded SQL?

From: FatP <thatsang_at_gmail.com>
Date: Sun, 22 Jul 2007 23:27:52 -0700
Message-ID: <1185172072.836199.150840@e16g2000pri.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US