Havouza Posted December 11, 2020 Posted December 11, 2020 Hi! Someone can help with an sql query please. I need to copy data from one column in the table to a second column in the same table. But only if the cell in the second column is empty. If the sell contains info it should be left Hope some sql guru understand the problem
Wartin Posted December 11, 2020 Posted December 11, 2020 (edited) 28 minutes ago, Havouza said: I need to copy data from one column in the table to a second column in the same table. But only if the cell in the second column is empty. If the sell contains info it should be left Hello. Not a big SQList, but, try this (after backing up the database!) UPDATE yourTableName SET secondcolumn = onecolumn FROM yourdatabase WHERE secondcolumn IS NULL Edited December 11, 2020 by Wartin
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now