and more in a single search tool across platforms. Read the announcement here. |
03/12/2024 10:54 AM
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 Query | select NULL AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71; |
Prepared Query | UPDATE 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!
03/12/2024 10:59 AM
select '' AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71; |
03/12/2024 11:09 AM
Hello Rushikesh,
It is still failing:
Input Query | select '' AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71; |
Prepared Query | UPDATE CAMPAIGN SET FIRSTREMINDERMAILSENT =:firstremindermailsent WHERE id =:id |
Could you please help?
Thank you!
03/12/2024 11:36 AM
can't you update same from UI?
03/12/2024 11:41 AM
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?
03/12/2024 02:06 PM
You can’t NULL value using enhanced query
03/12/2024 02:01 PM
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;
03/12/2024 09:29 PM
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
03/12/2024 11:26 PM
try below
select 'null' AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 71;
03/13/2024 03:26 AM
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.
03/13/2024 03:31 AM
Thanks for confirmation.
03/18/2024 05:38 AM
Hello, I still do not have a solution. Please assist.
Thank you!
03/18/2024 06:26 AM
Currently its may not supported raise idea ticket
03/18/2024 06:46 AM
it is issue, need to raise ticket for accepting null value FIRSTREMINDERMAILSENT column in respected table @Wills
03/18/2024 07:17 AM
Hello,
I have reaised a ticket. Thank you for all the help!
03/18/2024 08:15 AM
Thanks for confirmation please close the thread and accept solution.
03/18/2024 08:53 PM
Use below query
select 0 AS campaign__firstremindermailsent,ID as campaign__PRIMARYKEY from campaign where ID = 559; |
Before
After
03/19/2024 05:49 AM
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!