How to check duplicate data and not insert to sql

var value = 6

var pld

pld = "INSERT INTO [HIG].[dbo].[Alum]"

pld = pld + "([Aluminium])"

pld = pld + "VALUES ('" + value + "')"

msg.payload = pld

return msg;

IF value equals 6 not insert data to sql

> ?? How to check ??

I don't understand, you are setting 'value' to six.

Are you trying to see if the msg entering your function has a value of 6? If so, add a switch node before the function node to test for 6 and don't pass the msg if it does.

Or do you want to only INSERT if a record already exists WHERE value = 6 ?

If so, what dbms are you using?

sql server management studio
if data is duplicate not insert

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.