-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: multiple update #70
Comments
Could you please provide the exact data for all the tables? |
How to provide data? Sql script or completely database? |
An SQL script with enough data to reproduce the problem (the less data the better). |
-- table: variable_list
|
I tried many different variations of the code.
displays the corresponding number of lines and replaces the corresponding variable in each line.
for some reason it does not replace all variables |
The problem is not related to the
|
Why doesn't recursion work then? |
Because at the end of the day you are doing the same |
And you don't need the What you can do, however, is use the For example. Prepare a separate update query for each variable: alter table variable_list add column var_stmt as (
"update extention_files_detal set source_text = " ||
"replace(source_text, '" || variable_name || "', '" || variable_text || "')"
); Execute the queries: select eval(var_stmt) from variable_list; Results:
|
I cannot do without your library. Thank you. |
How the code will be correct
throws an error on |
The queries I've provided are correct. What is the specific error you are getting? |
Your query is correct. I converted it into two fields and regexp_substr.
What did I write wrong? |
The function to use is |
Is it possible to use regexp_substr? |
|
Sorry, I wrote the wrong function. But - simple |
Last question. |
Yes. Although for |
Thank you |
Sure! I'm glad we figured it all out. |
Good afternoon.
I have a table with keys and parameter values.
There is a data table
I need to update the extention_files_detal table using the key - value from the variable_list table
My code.
Variables are {SYSTEMNAME_ALL_LOWER},{DATE} ... Value - any text
If the extention_files_detal record contains only one key-value pair, then everything works. If there are several key-value pairs, no update occurs. How to update for multiple values?
The text was updated successfully, but these errors were encountered: