SQL Parameters Passing

Discuss your general Proclaim related queries here.
Post Reply
Posts: 275
Joined: Sat Feb 11, 2012 9:17 am
Has thanked: 9 times
Been thanked: 2 times

SQL Parameters Passing

Post by rajeev108 » Tue Dec 04, 2018 1:23 pm

Is there something special when the answer to the same question is used multiple times in SQL criterion?

I run SQL("mysql", txt) where the txt has comma separated answers to the SQL questions. It always returns zero record when I know that it shouldn't. I change the query to SQL("mysql","") and it prompts for answers to my questions, I paste txt as the answer everytime and remove the fields not relevant to that answer. It brings back the correct number of records. The SQLERROR shows blank so the SQL is executing correctly. There is a question 'Address? which is used 5 times in the SQL in various OR clauses. The SQL only prompts once for answer when I run interactively so I pass it only once in my parameters text field txt. This syntax SQL("mysql", txt) has always worked for me but in those cases I don't use the answer to a particular question multiple times. Therefore my question at the top.

Incidentally as an experiment I removed the multiple uses of the same question and it works so there is something special about the question's answer used multiple times and passing parameter.

Post Reply