Hello thanks for your return,
Is it a SQL query that you placed into the SQL Statement section (under Advanced) when configuring the PQ connection to the database?
Yes I configure it in the advanced options.
Tell us a bit more about this query
I simplified my query to the extreme and anonymize it (no choice sorry).
Code:
-- delete tables
DELETE a
DELETE b
DELETE c
DELETE d
-- populate database table a
INSERT INTO a
SELECT t.col1, t.col2, t.col2, t.col3, t.col4,
FROM a_view t
WHERE t.col1 IN (Select colx FROM table1 WHERE colx in (parameter FROM excel) --parameter in excel
-- populate database table b
INSERT INTO b
SELECT t.col1, t.col2, t.col2, t.col3, t.col4,
FROM a_view t
-- populate database table c
INSERT INTO c
SELECT t.col1, t.col2, t.col2, t.col3, t.col4,
FROM a_view t
-- results
INSERT INTO d
SELECT * FROM a
UNION
SELECT * FROM b
UNION
SELECT * FROM c
no problem so far, it works fine
I run my query to display the table
and PQ deletes the contents of my table (I specify that the database table was well populated)
On the other hand, when I execute the query under SSMS my result table does not empty even if I refresh it under Excel. I conclude that it is a problem with PQ.
How many rows does the SSMS version usually return?
it is variable with parameter in Excel. But it never exceeds 50000 rows.
Sorry for my english but i am french and i write in english thanks to google translate.
Thanks
Bookmarks