Parsing of sql query unclear

266 views
Skip to first unread message

wolfgangsc...@gmail.com

unread,
Sep 17, 2013, 3:33:36 AM9/17/13
to suppor...@runmyprocess.com
Dear team,

I have setup a SEC connector and a DB connector, which accesses a PostgreSQL DB on a remote machine. This works fine and I can define connectors with individual SQL statements.
But there is a problem defining the SQL command for the connector using the dialog "Open editing window". If I paste my SQL command in the section "Script" in the dialog "Sql query", the execution of the command might fail.

1.) If the command looks like:

SELECT leave_request.tkey, leave_taken.firstday, leave_taken.lastday
FROM leave_request, leave_taken
WHERE leave_request.userid='${userLogin}' AND
leave_request.tkey=leave_taken.leave_request_tkey
ORDER BY leave_taken.firstday

launch Test results in:
ERROR: missing FROM-clause entry for table "leave_request"
Position: 8


2.) If the command looks like:
(first part of FROM clause in the same line)

SELECT leave_request.tkey, leave_taken.firstday, leave_taken.lastday FROM leave_request,
leave_taken
WHERE leave_request.userid='${userLogin}' AND
leave_request.tkey=leave_taken.leave_request_tkey
ORDER BY leave_taken.firstday


launch Test results in:
ERROR: syntax error at end of input
Position: 89


3.) If the command looks like:
(complete FROM clause in the same line)

SELECT leave_request.tkey, leave_taken.firstday, leave_taken.lastday FROM leave_request, leave_taken
WHERE leave_request.userid='${userLogin}' AND
leave_request.tkey=leave_taken.leave_request_tkey
ORDER BY leave_taken.firstday

launch Test results in:
SELECT statement is executed, but the WHERE condition is ignored, which results in a complete wrong result set.

Can you please explain the parsing logic behind this dialog?

Thank you in advance
Wolfgang

Nicolas Triballier

unread,
Sep 23, 2013, 7:24:49 AM9/23/13
to supportforum
HI Wolfgang,

Sorry for the delayed answer. I just made a test, and it works if you put the whole SQL command on the SAME line.
I'll ask support of carriage return. In the meantime, please follow my recommandation.

ttyl

Nicolas


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/f04176bc-04a7-460a-a963-7c8f5e5d5322%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.


Reply all
Reply to author
Forward
0 new messages