Solved

Writer in update mode giving me problems ...

  • 26 January 2023
  • 1 reply
  • 16 views

Userlevel 1
Badge +22

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

icon

Best answer by ctredinnick 26 January 2023, 10:55

View original

1 reply

Userlevel 3
Badge +16

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.

 

Reply