Skip to main content
Solved

Writer in update mode giving me problems ...

  • January 26, 2023
  • 1 reply
  • 68 views

lifalin2016
Contributor
Forum|alt.badge.img+29

Hi all.

I'm trying to update single values in a table, which has 3-4 keys. The three keys are mandatory, while the 4th is optional.

A writer will apparently only update records which has a value for the 4th parameter, erroring when this value is NULL.

Why is that ?

I tried to test for the NULL value, but that didn't work. Apparantly the value needed to be tested as being an empty string, not a <null> value, even though that was what it contained.

Is that a bug ?

And lastly you - again apparently - cannot simultaneously have a writer/update and a SQL Executor (to handle the NULLs), the writer blocks the SQL Executor. I had to ditch the writer and go with two SQL Executor's.

Why does a writer block transformers ?

All this a s a warning to y'all. Can anyone confirm these findings ?

Cheers.

2020.2 / MS SQL Server

Best answer by ctredinnick

For the update statement, try switching it to write your own Where Clause, instead of Match Columns. That way you can handle nulls in your 4th column with your own statement. WHERE x = @Value(x) and ISNULL(y,'') = '@Value(y)' or whatever your data needs.

Then, a SQL writer parameter is likely set to the default mode of 'bulk insert'. This Alters the table so data can be inserted quicker (bypassing triggers etc), and this is probably what is blocking your SQLExecutor.

 

View original
Did this help you find an answer to your question?

1 reply

ctredinnick
Supporter
Forum|alt.badge.img+18
  • Supporter
  • Best Answer
  • January 26, 2023

For the update statement, try switching it to write your own Where Clause, instead of Match Columns. That way you can handle nulls in your 4th column with your own statement. WHERE x = @Value(x) and ISNULL(y,'') = '@Value(y)' or whatever your data needs.

Then, a SQL writer parameter is likely set to the default mode of 'bulk insert'. This Alters the table so data can be inserted quicker (bypassing triggers etc), and this is probably what is blocking your SQLExecutor.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings