In MySQL, the BIT_AND()
function returns the bitwise AND
of all bits in a given expression.
Author: Ian
Fix “Explicit conversion from data type int to date is not allowed.” in SQL Server
If you’re getting SQL Server error Msg 529 that reads something like Explicit conversion from data type int to date is not allowed, it’s because you’re trying to perform an explicit data type conversion that’s not permitted.
SQL Server doesn’t allow certain conversions. If you try to perform such a conversion, you’ll get this error.
Continue reading10 Functions that Modify JSON Values in MySQL
MySQL provides us with a bunch of functions that can modify JSON values. Here are ten functions that we can use to modify JSON values in MySQL.
Continue reading6 Ways to Extract JSON Data in MySQL
In MySQL, we have several options when it comes to extracting data from JSON documents. Below are six methods we can use to do this.
Continue readingGenerate a Range of Sequence Numbers in SQL Server (sp_sequence_get_range)
In SQL Server, we can use the sp_sequence_get_range
stored procedure to generate a range of sequence numbers from a sequence object.
Fix “WRONGTYPE Operation against a key holding the wrong kind of value” when using ZADD in Redis
If you get an error that reads “WRONGTYPE Operation against a key holding the wrong kind of value” when using the ZADD
command in Redis, it’s probably because you’re trying to update a key that contains the wrong data type.
To fix this issue, be sure to only use the ZADD
command against sorted sets if the key already exists. If the key doesn’t already exist, then you shouldn’t get this error.
7 Functions that Create JSON Values in MySQL
MySQL includes some inbuilt functions that can be used to create JSON values, such as JSON arrays, JSON objects, or a quoted string literal.
Here are seven functions that allow us to create JSON values in MySQL.
Continue readingHow to Order a Query in SQL Server when using a Sequence to Number the Results
One common use case for sequences in SQL Server is to use them to number the results of a query. For example, we can add a column that has a number that increments with each row, similar to a row counter (but with a sequence that we define).
Continue readingMySQL JSON Functions & Operators
Below is a list of the JSON functions and operators available in MySQL.
Continue readingFix Error Msg 220 “Arithmetic overflow error for data type…” in SQL Server
If you’re getting error msg 220 that reads something like Arithmetic overflow error for data type…, it’s probably because you’re trying to convert a value to a data type that can’t handle that value. For example, trying to convert a number to a smallint but the number’s too big to fit into a smallint.
To fix this issue, make sure you convert the value to a data type that can handle the size of the number that you’re trying to convert.
Continue reading