News:

Welcome on our forum!

Main Menu

SQL DB plug-in not write NULL value

Started by jamesant, October 11, 2013, 10:12:19 AM

Previous topic - Next topic

jamesant

How can I stop the SQL database plug-in from carrying out an SQL query if any of the values it needs to write is NULL ?

For example

insert into ADatabaseT1
values (:P1,:P2,:P3)   

if the value of P1 is NULL, I want the sql query to be skipped

Arthur Grasin

You need to do it with a filter plugin.
If you like my work, please take a few seconds and add feedback about our site or our software [here]

jamesant

I tried using the deadband filter, but found it didn't do what I needed

I solved it by changing the sql query.
It deletes the record if it wrote a null value into the Temp1 column.

insert into ADatabaseT1
values (:P1,:P2,:P3)   
delete from ADatabaseT1
where Temp1 is null