Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The converted code is issuing a syntax error when the original one owns '(+)', the Oracle native symbol. #1558

Closed
markeuzebio opened this issue Nov 28, 2022 · 1 comment

Comments

@markeuzebio
Copy link

Hello. I hope everything's fine over there.

I'll put pieces of an original script and the converted one, respectively, by Ora2Pg in its last version (23.3).

Original
[...]
FROM COMPANYBRA C, COMPANY CO, ISNF F
WHERE (C.CDBRANCH = P_BRANCH) AND
(C.CDCOMPANY = P_CDCOMPANY) AND
(CO.CDCOMPANY = P_CDCOMPANY) AND
(C.CDTYPE = F.CDTYPE (+));
[...]

Converted
[...]
FROM company co, companybra c, (c
LEFT OUTER JOIN isnf f ON (C.CDTYPE = F.CDTYPE)
WHERE (C.CDBRANCH = P_BRANCH) AND (C.CDCOMPANY = P_CDCOMPANY) AND (CO.CDCOMPANY = P_CDCOMPANY);
[...]

Where P_* are variables

The thing here is that it's having a failure to convert (+) to LEFT OUTER JOIN, since:
1. There is a parenthesis not having a correspondent (the opened one before the letter 'c' is not being closed anywhere).
2. It's not possible to reference the table companybra by the letter c inside brackets, since this letter is already being used.

I am not totally sure, but I think the idea here would be to remove , (c part and let only FROM company co, companybra c part, for example, so that the LEFT OUTER JOIN would succeed.

It is a problem that is relatively easy to solve manually, but I am pointing this out because there are several PROCEDURES which I am trying to convert and is behaving the same.

@darold
Copy link
Owner

darold commented May 12, 2023

Unfortunately this is not possible to do automatically, edit manually.

@darold darold closed this as completed May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants