[lug] OT: CPP question

Tkil tkil at scrye.com
Sat Mar 30 19:03:54 MST 2002


>>>>> "George" == George Sexton <Sexton> writes:

George> Actually I am pre-processing a SQL Script into multiple
George> variants. I.E. SQL Server, Postgresql, Oracle, etc. Hence the
George> single quotes. I have never tried to use M4. I will have to
George> look at it.

i figured that it was likely SQL.

you might actually be better off with a custom processor for this.
one perl solution uses "ideal" query objects built up part-by-part,
then you ask it to express itself ("stringify", in a way) in the
appropriate dialect.

for this particular situation, a quick program that can recognize,
e.g., "QUOTE(...)" and do the right thing shouldn't be too hard.

t.



More information about the LUG mailing list