Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I ran an update statement like this, last night. where it is joining local data Table_V2 with data on another
Tag: sql-update
Merge Null Values in Merge Command
i must merge multible database tables in a node js windows service. so i decided to write a method that creates a sql string for this. here is my method: this method and the created sql string works nice, expect in one case. if the value in the source table column is NULL the target will not be updated. here
How to insert yes or no value into flag column based on regex query
I have a simple update that works great work analyzing a US based telephone number. It correctly inserts a Y in the phone_flag column based on the following query. UPDATE database.table SET phone_flag …
How to update only first NULL column with a value in Snowflake sql?
How to update a table first Null column with value and other Null columns with the text ‘Available’? My attempt: I tried using Case statements but it is affecting the performance of a query. Is there any efficient way to update a table as mentioned below the expected format? Expected Output: Answer Try using a combination of nvl2 and coalesce
SQL Data cleaning
I have a data set where I am trying to clean data. I want to remove the ** from email-address and phone_number and have just numbers in the phone_number column. how can i do it. Answer Here is one option using string functions: This removes ‘**’ from email, and all non-digit characters from phone_number.
How to update table with data from another table
I have two tables First table INTRA.TABLE_A Second table EXTRA.TABLE_B And I am trying to get data from INTRA.TABLE_A into EXTRA.TABLE_B with update: But it “throws” syntax error at FROM word: syntax_error After update, result should looks like: I am using sqlDeveloper and Oracle database. How can I fix it? Answer Oracle does not support joins in update queries –
Updating joint query in Oracle
I’m trying to update the name on the trade table according to the user table however as we have so many trades I don’t want my query to update each and every trade. only the ones that have the …
PostgreSQL duplicate key value violates unique constraint while using on conflict do nothing on insert
Table def: I have a function that inserts new rows into the database: It fails with the index Although running the relevant insert on its own with duplicate values it has no problem with it. I can’t understand what seems to be the the difference between the function and the single statement? This also works without a problem: same error
replace column with other column if value is ABC*
MYSQL PHPmyAdmin I have a table “photo” I have a column named “column_title” (varchar(300)) and a column named “column_description” (text). The title is sometimes ABC and …
SQL UPSERT QUERY W/ Duplicate Rows Made Unique Based Upon 3 Fields (C# VisStudio)
Background is I’m making a SQL connection that takes a .csv file and imports it into a SQL Server database table. The problem I’m running into is, I’m having trouble with the query syntax because …