All Forums Database
tom.gnade 13 posts Joined 03/12
04 Sep 2012
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?

ulrich 816 posts Joined 09/09
04 Sep 2012

No - can you share the code?

And what is the error code you get?

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

tom.gnade 13 posts Joined 03/12
04 Sep 2012

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 ')'.

ulrich 816 posts Joined 09/09
04 Sep 2012

try

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

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

tom.gnade 13 posts Joined 03/12
04 Sep 2012

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

ulrich 816 posts Joined 09/09
04 Sep 2012

PS. it has to be

right outer join

or

left outer join

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.