now it works but when I try to insert any data It response that It failed, so the type of data is important when inserts? because of follow with your template it doesn't put a type of data. |
Yes it is important to know the type of the data in the Database during Insert operation.
In the provides sample, we have consider all the fields as String Data type. Please find the Syntax for the insert and delete operation in the below query.
| ||||||||||||
Can you give me correct sintaxis to write an insert query and delete query to can execute in Syncfusion processors?
|
You can use PutSQL processor to execute Insert/Delete query.
Consider the example provided in the sample,
Table name – AdventurePerson
Schema-
In ReplaceText Processor, you need to specify the insert or delete statement as given below,
Insert Statement-
Syntax - insert into <tableName>(<column1>,<column2>,<column3>,..) values(<attribute1>,<attribute2>,<attribute3>,..)
You need to specify ‘ (Single Quotes) for the data types String, Character, Timestamp.. For numeric data type you just send the attribute from the flow file as it as to insert statement.
Example- insert into AdventurePerson(ID,CustomerName,Age,Email,ContactNo,CreatedDate) values(${csv.1},'${csv.2}',${csv.3},'${csv.4}',${csv.5},'${csv.6}')
Here the highlighted attributes are considered as String and TIMESTAMP in the Oracle.
Delete Statement-
Syntax - Delete from <tableName> where ID=<yourattribute>
Example - delete from AdventurePerson where ID=${csv.1}
Here we are deleting the record,when the column ID is matched with the incoming attribute in the flow file. |