Deleting value | Community
Skip to main content
Level 2
Dec 14, 2017 10:32 AM UTC
Solved

Deleting value

Hi

I need to do something that should be easy: deleting information from the table (I'm deleting adress information that is no longer accurate).

However, I can't seem to do it.

I'm using a data update component and for each field that need to be deleted, I'm setting the source to ''. At runtime, this ends with a sql error.

Does anyone know what should be the proper process to delete the value of a field ?

Thanks for your help

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Jean-Serge_Biro
Jean-Serge_BiroAccepted solution
Level 10
Dec 14, 2017 6:00 PM UTC

Hello,

It is more probably a question of integrity constraint, or value type mismatch.
In SQL queries you can use NULL values; if you want to do it with Update activity, please check the Advanced parameters checkbox. And please share the exact SQL error

Regards

J-Serge

7 replies

Level 2
Dec 15, 2017 12:57 PM UTC

Hi Jean-Serge

Thanks for your inputs, they helped me solved my problème.

My 2 mistakes were the following:

- updating a value with the '' string (empty string) does not work (the value is not erased)

- when using the NULL value, you canot just enter NULL in the list of field to be updated. You need to click on "Edit the source expression", then enter NULL and validate.

Translate
Jean-Serge_Biro
Jean-Serge_BiroAccepted solution
Level 10
Dec 14, 2017 6:00 PM UTC

Hello,

It is more probably a question of integrity constraint, or value type mismatch.
In SQL queries you can use NULL values; if you want to do it with Update activity, please check the Advanced parameters checkbox. And please share the exact SQL error

Regards

J-Serge

Translate
Employee
Dec 14, 2017 2:02 PM UTC

I know the sql way of doing it. Sorry, I am not aware of any other way.

Translate
Level 2
Dec 14, 2017 1:09 PM UTC

I was looking for a non-sql solution, to keep the workflow easy to understand for people with less database skills.

Or does this mean it is not possible delete some values using the Update data component ?

Translate
Employee
Dec 14, 2017 12:04 PM UTC

Hi,

Please try the below sql. Modify the sql with your table name and column name. All the values of the given column in the table will be deleted.

Thanks,

Rajesh

Translate
Level 2
Dec 14, 2017 11:17 AM UTC

Yes, I'm doing the "Update" operation because I need to keep the record and just delete some of its value

Translate
florentlb
Level 10
Dec 14, 2017 11:13 AM UTC

Hi,

What operation are you performing with the update data activity?

There is a dedicated "delete" operation in this activity which can be used. From what you described, I understood that you are using the "Update" operation.

Florent

Translate