Do macros only support ANSI sql?

Database
Enthusiast

Do macros only support ANSI sql?

Hi all,

I'm trying to run a performance comparison between Oracle and Teradata. I've ported the data from our Oracle database, and now I'm trying to test the procedure rewritten as a macro. The proc is written in standard non-ANSI sql. It executes fine as-is in SQL Assistant, but every time I attempt to create the macro, the error "Query is invalid" is returned. Do macros only support ANSI sql?

5 REPLIES
Supporter

Re: Do macros only support ANSI sql?

No - can you share the code?

And what is the error code you get?

Enthusiast

Re: Do macros only support ANSI sql?

Ok I've done some testing, and it looks like the Oracle (+) notication for the outer join sytax is the problem:


select *


from t_1, t_2


where t_1.some_id = t_2.some_id (+);

SELECT Failed. 3706: Syntax error: expected something between '+' and ')'.

Supporter

Re: Do macros only support ANSI sql?

try

select *
from t_1
outer join
t_2
on t_1.some_id = t_2.some_id;

Enthusiast

Re: Do macros only support ANSI sql?

Ok thanks. I was trying to avoid rewriting the whole thing its 1000+ lines in a single select statement. Here goes...

Supporter

Re: Do macros only support ANSI sql?

PS. it has to be

right outer join

or

left outer join