In Redis, the ZUNION command returns the union of the specified sorted sets.
Fix “NEXT VALUE FOR function does not support the PARTITION BY clause.” (Error Msg 11716) in SQL Server
If you’re getting an error that reads “NEXT VALUE FOR function does not support the PARTITION BY clause” in SQL Server, it’s probably because you’re trying to use the PARTITION BY sub clause in an OVER clause when using NEXT VALUE FOR to increment a sequence object.
In other words, the NEXT VALUE FOR function does not support the PARTITION BY sub clause of the OVER clause.
To fix this issue, either remove the PARTITION BY clause or change the statement to use another method for partitioning the results.
Redis ZREVRANGEBYSCORE Replacement
Starting with Redis 6.2.0, the ZRANGE command added the REV, BYSCORE, BYLEX and LIMIT options. The addition of the first three options means that the ZRANGE command can now do what the ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX and ZREVRANGEBYLEX commands can do.
As a result, those commands are now deprecated (as of Redis 6.2.0).
Therefore, we should no longer use the ZREVRANGEBYSCORE command. Instead, we should use the ZRANGE command with the REV and BYSCORE argument.
Redis ZREMRANGEBYRANK Command Explained
In Redis, the ZREMRANGEBYRANK command enables us to remove all members from a sorted set with a rank between a certain range.
Redis ZREMRANGEBYSCORE Command Explained
In Redis, the ZREMRANGEBYSCORE command enables us to remove all members from a sorted set with a score between a certain range.
Redis ZREMRANGEBYLEX Command Explained
In Redis, the ZREMRANGEBYLEX command enables us to use a lexicographical range to remove members from a sorted set. That is, we can specify that all members between a given lexicographical range are removed.
This relies on all members having the same score (which forces lexicographical ordering).
Redis ZREM Command Explained
In Redis, the ZREM command removes one or more members from the specified sorted set.
Create a Sequence using the Default Values in SQL Server
When creating a sequence object in SQL Server, it’s common to set various properties such as the start value, the increment, and even things like the maximum and minimum values for the sequence. But it is also possible to create a sequence without setting any of these properties.
Fix “WRONGTYPE Operation against a key holding the wrong kind of value” when using ZUNION or ZUNIONSTORE in Redis
If you get an error that reads “WRONGTYPE Operation against a key holding the wrong kind of value” when using the ZUNION or ZUNIONSTORE commands in Redis, it’s because you’re passing a key with the wrong data type.
To fix this issue, make sure the keys you pass to these commands contain either sets or sorted sets. Although these commands are for sorted sets, they also work with non-sorted sets.
Redis ZINCRBY Command Explained
In Redis, the ZINCRBY command increments the score of a given member in a sorted set.