Data Sources JDBC SQL statement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2024 02:42 AM
I am currently connecting to an external system through JDBC.
I know that by writing the 'SELECT * FROM TABLE' statement in the 'SQL statement', I can obtain the content of the external database.
But I would like to know if it is possible to write an 'Insert' statement in an 'SQL statement'? How to write variables?
If not, I want to know how to add data to an external database through JDBC.
thank!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2024 02:59 AM
Hi @Li QingWen
The purpose of JDBC data source is gets data from the database by using the connection specified in the test step. The data source can either use a project database connection, or a connection specified only for the data source.
To add data to an external database you need to use the integration OR you can export data in excel format and import it in your external database.
I hope my answer helps you to resolve your issue.
Thank you
Rajesh chopade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 10:10 PM
Hi
I also encountered the same problem here. May I ask about adding data to an external database. What should be done specifically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 11:12 PM
Hi @ddd
ServiceNow does not have the ability to write directly to an external database (e.g. SQL Server) using ODBC or JDBC. If the database has an exposed Web Service that allows records to be inserted, then you can call that Web Service. However, most database management systems do not provide such a service out-of-box.
Export Sets allow you to write an external file on a schedule (e.g. once/day). You then need to write a separate import process to load the file into your database.
There are various third-party products that will replicate your ServiceNow data to an external database on a schedule (e.g. daily or hourly). Please refer to this recent post for a discussion on some options:
Thank you
Rajesh chopade