Can a function be use in the "Data Substitution" feature when exporting data as an insert statement?
For example:
1. select col1, col2 from t1
2. Right click on the data grid and select "Save As".
3. Saved the result as an insert statements. By default, the insert statements will look like this:
insert into t1 (col1, col2)
values ('AB', 'BC');
However is there a way for me to save it where I can put in a function in the values clause using the "Data Substitution" feature to look like below?
insert into t1 (col1, col2)
values ('AB', replace('BC', 'Y', 'Z');
This cannot be done in Toad Data Substitution. Toad just substitutes a constant for the whole string. An example would be the word "SYSDATE" in a date column.
User could just put the word "replace" in their select statement:
select col1, replace(col2, 'Y', 'Z') from t1
The insert statements would not contain the replace function, but the data in the insert statements would already have the "replace" applied to them.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center