Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question SQLOperation to select tables to drop

More
03 Jan 2019 15:51 #1 by leo75
leo75 created the topic: SQLOperation to select tables to drop
Hi!

First of all, happy new year!

Second, I have a process wich is composed of two SQLOperations :
- the first one : select the table to drop on the database

- the second one : linked by a DirectBind to the first one, is getting the select result from # and is supposed to drop the tables

But... it doesn't do anything...
Any idea?

Thanks a lot!

Leo
Attachments:
More
04 Jan 2019 17:20 #2 by Thomas BLETON
Thomas BLETON replied the topic: SQLOperation to select tables to drop
Hi Leo and happy new year :)

At first sight everything looks correct.
What happens at execution ?
What is the value of the variable "CORE_BIND_ITERATIONS" for the "DropTablesSelected" action, after execution ?
More
07 Jan 2019 09:18 #3 by leo75
leo75 replied the topic: SQLOperation to select tables to drop
Hi Thomas,

After execution, CORE_BIND_ITERATIONS = 0

I know that's not a good sign :silly:

Attachments:
More
07 Jan 2019 10:59 #4 by Thomas BLETON
Thomas BLETON replied the topic: SQLOperation to select tables to drop
CORE_BIND_ITERATIONS = 0 means that the SELECT action did not fetch any rows.
=> double check your SELECT query :)
More
07 Jan 2019 11:23 #5 by leo75
leo75 replied the topic: SQLOperation to select tables to drop
When I execute the query on MSSQL Studio, it returns lines, but the same query executed in Stambia returns 0 line.
I think there is something wrong with the schema, it's like the query is not executed with the schema I set up in the parameters of the SQLOperation.
More
07 Jan 2019 11:29 - 07 Jan 2019 11:29 #6 by Thomas BLETON
Thomas BLETON replied the topic: SQLOperation to select tables to drop
That is probably the reason.
MSSQL Studio creates a kind of context when you open a SQL editor => I suppose the SQL editor works in a "current" database and/or schema. This kind of client-specific context does not exist when working with Stambia (our SQL editor is a generic JDBC client).
=> Try to specify fully qualified names for the Tables / Views : <database>.<schema>.<table>
Last Edit: 07 Jan 2019 11:29 by Thomas BLETON.
More
07 Jan 2019 11:54 #7 by leo75
leo75 replied the topic: SQLOperation to select tables to drop
All good, it's working the DB + schema in the query!

Thanks!