Fix “Conversion failed when converting the varchar value” When Trying to Concatenate in SQL Server

If you get error Msg 245 that reads “Conversion failed when converting the varchar value…” when trying to perform a concatenation operation in SQL Server, it’s likely that you’re attempting to concatenate a string and a number.

Doing this will result in an error, due to SQL Server trying to add the string and number instead of concatenate them.

To fix this, either convert the number to a string, or use a function like CONCAT() or CONCAT_WS() to perform the concatenation.

Continue reading

Fix: “operator does not exist: integer || integer” in PostgreSQL

If you get the “operator does not exist: integer || integer” error in PostgreSQL, it’s probably because you’re trying to concatenate two numbers.

If you really want to concatenate two numbers, the easiest way to overcome this issue is to cast at least one of them to a string data type first.

Another way to do it is to use the CONCAT() function.

Continue reading

Fix: “BACKUP LOG cannot be performed because there is no current database backup.” in SQL Server/SQL Edge

If you’re trying to back up the transaction logs in a SQL Server or SQL Edge database, but you get an error that states BACKUP LOG cannot be performed because there is no current database backup, you’ll need to perform at least one full backup of the database before you attempt to back up the transaction logs.

Continue reading

Fix: “The statement BACKUP LOG is not allowed while the recovery model is SIMPLE” in SQL Server (and SQL Edge)

If you get an error that reads The statement BACKUP LOG is not allowed while the recovery model is SIMPLE when trying to back up a database in SQL Server or Azure SQL Edge, it’s because you’re trying to back up the transaction logs on a database that uses the simple recovery model.

To fix this, change the recovery model to either full or bulk logging.

Continue reading

Fix ‘The application “SQLDeveloper.app” can’t be opened.’

If you just installed SQL Developer on a Mac, but you’re getting an error when trying to launch it, try the steps below to fix it.

The error reads “The application “SQLDeveloper.app” can’t be opened because Apple cannot check it for malicious software“. It also mentions that “This software needs to be updated. Contact the developer for more information“.

Below are the steps I used to overcome this issue, and launch SQL Developer.

Continue reading