AGG Software Forums
September 20, 2024, 01:20:48 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: SQL DB plug-in not write NULL value  (Read 14160 times)
jamesant
Jr. Member
**

Karma: +0/-0
Posts: 7


View Profile
« on: October 11, 2013, 01:12:19 PM »

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
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: October 11, 2013, 01:42:43 PM »

You need to do it with a filter plugin.
Logged
jamesant
Jr. Member
**

Karma: +0/-0
Posts: 7


View Profile
« Reply #2 on: October 11, 2013, 02:35:48 PM »

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 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines