- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 07:14 AM
Hello!
I am hoping someone can help review my Oracle SQL syntax to see if I am sending something in wrong or formatting it incorrectly as I can't seem to get a simple SELECT query to work.
I am able to connect successfully out to an Oracle DB and I would like to run a simple SELECT statement that checks to see if a row exists. From there, I will perform different catalog task creation from there.
The following SELECT statement that was provided to me works within the Oracle program installed but it doesn't seem to work when I try to test this out in the action.
SELECT * FROM DBA_USERS WHERE UPPER(USERNAME) IN('XXXXX'); -----XXXX is the identifier I am populating
In order to make this a bit more efficient, I got rid of the * and just did the username column so:
SELECT USERNAME FROM DBA_USERS WHERE UPPER(USERNAME) IN('XXXXX');
I then get the following error:
When I try to shorten the query to try to pull rows in general - I get the following error:
In any case, I am curious as to why I am struggling with simple SELECT syntax is not working. Any tips or ideas as to how I can get this to work? Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 12:04 PM
I was able to resolve the issue.
The custom action had an input where we would place the SQL statement in the input and place that into the SQL statement within the JDBC custom action. For some reason, that did not play nice. As soon as put the direct SQL statement in that field - it worked just fine. I hope that helps for others!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 07:15 AM
To confirm as well, I have tried to sanitize the SQL statement. I have an input to the action for the statement which is then parsed in the step. I've tried both functions to sanitize.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 12:04 PM
I was able to resolve the issue.
The custom action had an input where we would place the SQL statement in the input and place that into the SQL statement within the JDBC custom action. For some reason, that did not play nice. As soon as put the direct SQL statement in that field - it worked just fine. I hope that helps for others!