10-28-2016 11:51 AM
Hi Expert,
We have a requirement for which we have to insert records in an MS SQL table. The table contains a field of type DATETIME. We need to fill that field with the actual date and time.
We have concatenated date and time in the format 'YYYY-MM-DD HH:MM:SS' and we are getting the dump 'SQL error 241 occurred while executing Native SQL.'.
We are looping on an internal table to insert each record 1 by 1.
Could you please help to find a solution for the timestamp?
Thanks,
Vitish.
01-12-2017 8:13 AM
Hello Jelena,
The issue is solved. The timestamp format should be 'YYYY-DD-MM HH:MM:SS' instead of 'YYYY-MM-DD HH:MM:SS'.
Regards,
10-28-2016 2:18 PM
What have you tried so far? Google -> "SQL error 241" finds 400K+ entries, surely some of the posts should have triggered some ideas and further analysis. Ask the external database's DBA as well. It's not really an ABAP question.
01-12-2017 8:13 AM
Hello Jelena,
The issue is solved. The timestamp format should be 'YYYY-DD-MM HH:MM:SS' instead of 'YYYY-MM-DD HH:MM:SS'.
Regards,
01-12-2017 7:56 PM
If this is resolved then kindly let others know by accepting an answer. Otherwise this still shows up as "unanswered". Thank you.