Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Setting a column to NULL using Enhanced Query

Wills
New Contributor
New Contributor

Hello,

I am trying to run this simple query in Enhanced Query to set the firstremindermailsent column of a campaign to NULL. But, it is failing with the following details:

Input Queryselect NULL AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71;
Prepared QueryUPDATE CAMPAIGN SET FIRSTREMINDERMAILSENT =:firstremindermailsent WHERE id =:id

Following is the query:

select NULL AS campaign__firstremindermailsent, ID as campaign__PRIMARYKEY from campaign where ID = 71;

Could you please help?

Thank you!

 

17 REPLIES 17

rushikeshvartak
All-Star
All-Star
select '' AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71;

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello Rushikesh,

It is still failing:

Input Queryselect '' AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71;
Prepared QueryUPDATE CAMPAIGN SET FIRSTREMINDERMAILSENT =:firstremindermailsent WHERE id =:id

Could you please help?

Thank you!

can't you update same from UI?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

I am not aware of amy UI that gives access those fields of the Campaign table.

Is there a way to do it through a UI?

You can’t NULL value using enhanced query 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

dgandhi
All-Star
All-Star

What is the error that you are getting? Can you please paste that here?

try this also once:

select null AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71;

 

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @Wills 

Please refer to the below post where I had responded to similar requirement to null the value. 

Re: enhanced query execution: update column with N... - Saviynt Forums - 62104

Regards,

Dhruv Sharma

CR
Regular Contributor III
Regular Contributor III

try below 

select 'null' AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71;


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Wills
New Contributor
New Contributor

Hello,

Thank you for all your responses. I have tried all the NULL combinations possible before coming to the forum and non of them worked [ "NULL", 'Null', NULL, "", '', "''", ....]. From what I see on the built query, Enhanced Query does not build the query correctly when there is a null or blank value being used.

CR
Regular Contributor III
Regular Contributor III

Thanks for confirmation.

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Wills
New Contributor
New Contributor

Hello, I still do not have a solution. Please assist.

Thank you!

Currently its may not supported raise idea ticket


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

CR
Regular Contributor III
Regular Contributor III

it is issue, need to raise ticket for accepting null value FIRSTREMINDERMAILSENT  column in respected table @Wills 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Wills
New Contributor
New Contributor

Hello,

I have reaised a ticket. Thank you for all the help!

CR
Regular Contributor III
Regular Contributor III

Thanks for confirmation please close the thread and accept solution.


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Use below query 

select 0 AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 559;

rushikeshvartak_3-1710820381226.png

 

Before

rushikeshvartak_2-1710820359915.png

 

After

rushikeshvartak_1-1710820338466.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello Rushikesh,

I know that settting the value to 0 works. It is setting it to NULL that does not work. And based on the document, if you want to resend a reminder, you need to set the value to NULL and not 0.

Thank you!