Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
suvbin
Creator III
Creator III

Query execution failed

Hi,

Noticed a warning in the logs , Insert is getting failed . and all columns are not there in the insert statement . The task is running fine. Since its a warning.  But logged many data error in the exeception table

Statement: INSERT INTO [rawload].[salesadd] ( [client_id],[add_num],[number1],[DATe1],[NUMBER2],[SrcSys],[date2],[time],[Operation_Indicator] )  VALUES ('100','1100010925','2200681871','0001-01-01','001','salesadd sys','2023-04-20','11:12:42','D')

Error: RetCode: SQL_ERROR  SqlState: 23000 NativeError: 515 Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'defval', table 'abc.[rawload].[salesadd]'; column does not allow nulls. INSERT fails. Line: 1 Column: -1

Source is SAP Application and

Target is Azure SQL Database

There are no filters in the task. 

Checked the DDL for source and target, for "defval" column , it's  "not null" . 

Tested running same insert statement into target , got the same error

 

The below is the  settings.

suvbin_0-1698803836088.png

 

Labels (3)
3 Replies
Heinvandenheuvel
Specialist III
Specialist III

ell, that column 'defval' is not pesent in the insert statement and therefor it will be treated as NULL, which is apparently not allowed.

Why is it not there? Your description suggests it exists on source and target (with non-null attribute). It would seem there is a table edit which drops that column. How else?

Repeat with  just that table and just a few row, and Logging verbose for source_reader and target_apply and afterwards search the log for any and all mention of 'defval' 

btw... that date ,'0001-01-01', looks odd also. It may be a silly test value or is might be wrong.

Hein

suvbin
Creator III
Creator III
Author

Issue resolved by giving some default value to the column in the transform section . 

DesmondWOO
Support
Support

Hi @suvbin ,

If our response has been helpful, kindly consider clicking "Accept as Solution" button for the corresponding post. This will help other users identify the answer.

Thanks,
Desmond

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!