Oracle SQL: Update table with data from another table

Suppose you have a column in Table1 that you need to update with data from another column in Table2. Let’s do it!

May 11, 2022 · 1 min · 173 words · Vitalie Ciobanu

“Must declare the scalar variable” error in Toad for SQL

There are different execution needs depending on what you are doing. See when you need to use F5 and F9.

February 21, 2021 · 2 min · 257 words · Vitalie Ciobanu

Examples of Count, Count IF, Count duplicates in SQL

Count: SELECT [ProductModel], COUNT(1) CNT FROM [AdventureWorks2017].[Production].[vProductAndDescription] GROUP BY [ProductModel] ORDER BY CNT DESC Count “if”: SELECT [ProductModel], [Name],COUNT(1) CNT FROM [AdventureWorks2017].[Production].[vProductAndDescription] WHERE [ProductModel] LIKE ‘%Frame’ AND [Name] LIKE ‘%52’ –here’s the IF statement GROUP BY [ProductModel], [Name] ORDER BY CNT DESC Count duplicates: SELECT [ProductModel], COUNT(1) CNT — select a field you want to…

June 1, 2019 · 1 min · 108 words · Vitalie Ciobanu

Install SQL Server on a 64 bit Windows Server–missing SQLncli_x64.msi

I had to install a copy of SQL Server 2005 on a Windows Server 2003 R2 SP2 x64. During installation I got a strange error saying that SQLncli_x64.msi file is missing. I was pretty sure that I have the same ISO file as I did while installing SQL so many times before and without any…

November 30, 2010 · 1 min · 117 words · Vitalie Ciobanu

Problem installing WSUS on a remote SQL server.

Today I again learned a lesson I knew for some time but was hoping that I can forget it. The lesson was about: “Trust anyone. Test for yourself.” Having to install WSUS on a remote SQL 2005 that had WSUS database installed before, I asked one SQL guy if renaming the old WSUS database is…

January 8, 2010 · 2 min · 240 words · Vitalie Ciobanu