Skip to main content
deleted 8 characters in body
Source Link
Vérace
  • 30.6k
  • 9
  • 71
  • 84

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL OR            
xero_settings IS NOT NULL OR... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have fields which have a NULL value for any of those records which violatesviolate the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL OR            
xero_settings IS NOT NULL OR... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have a NULL value for any of those records which violates the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL OR            
xero_settings IS NOT NULL OR... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have fields which have a NULL value which violate the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.

deleted 2 characters in body
Source Link
Vérace
  • 30.6k
  • 9
  • 71
  • 84

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL ANDOR            
xero_settings IS NOT NULL ANDOR... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have a NULL value for any of those records which violates the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL AND            
xero_settings IS NOT NULL AND... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have a NULL value for any of those records which violates the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL OR            
xero_settings IS NOT NULL OR... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have a NULL value for any of those records which violates the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.

Source Link
Vérace
  • 30.6k
  • 9
  • 71
  • 84

You have NULLs that violate the CHECK CONSTRAINT.

To verify that this is indeed the problem, run this SQL.

SELECT * FROM integrations.accounts WHERE qb_settings IS NOT NULL AND            
xero_settings IS NOT NULL AND... (fill in the fields that correspond to 
those in the CONSTRAINT).

This will give you all the records that have a NULL value for any of those records which violates the CONSTRAINT.

From your SQL, you have 59 such records - that's why you're getting the error.

What you need to do to rectify this is to run SQL similar to the following:

UPDATE My_Table SET My_Field = 0 WHERE My_Field IS NULL.

Obviously it is up to you to ensure that the values that you set correspond to your system's business logic and other system requirements.