You are viewing limited content. For full access, please sign in.

Question

Question

Error when attempting to pass a null value back to SQL

asked on September 23, 2024

We have a HR process that uses remote agent to connect to a SQL database. We've created a view that returns New employees. This is achieved by using an Except statement comparing the live employee table and another local SQL table that is the current employee data that's in Laserfiche. 

Using the remote agent, we are able to query the New Employee view, and it returns the expected data to Cloud. However, when the workflow runs and attempts to insert into the local SQL table, an error is returned "Can't cast null value to targetType". I'm assuming that's coming from the Term_Date column which returned null from the select statement.  

Is there a way to use the insert function to pass a null value to a SQL table from Cloud?

0 0

Replies

replied on March 20

I've come across this before, and had to work around it by running a custom SQL command instead of using the built-in insert activity. That gave me the ability to use NULL instead of 'NULL' as the value, which works correctly.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.