Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Posts tagged sql
I have a parent-child relation in my table, with possibly circular cases. Is it possible to break the infinite recursion in CTE checking values of all previous rows? I would need something like thi...
Context: I have a varchar column in a segment event table that contains version numbers. Most of these are formatted nicely as X.Y.Z (major.minor.patch) where X, Y, and Z are integers. However, the...
I like using NATURAL JOIN in Snowflake, because I find it more elegant than explicit join clauses. However, it appears that the natural join behaves similar to an inner join, in that null values o...
I have a query summarizing some transaction data that I'd like to summarize by day of week. For my use case, I need to return weekdays formatted according to ISO 8601, so Monday must be the first d...
I had three data with where gender=female. I was trying to call those data with limit and offset (Since in future there might be more than 1000 data). SELECT * FROM `users` WHERE `gender`='Female'...
What's the better way to store base64 in SQLite Database? I was thinking to put base64 as TEXT since base64 has lots of chars. CREATE TABLE name (id INTEGER PRIMARY KEY AUTO_INCREMENT, image TEXT)...
I have recently an issue at work after upgrading an ASP.NET Core 3.1 application to .NET 5. It worked correctly on all environments (e.g. PreProd, Prod) when targeting 3.1, but failed on Prod only ...
On 25th October 2020 in Europe/Berlin clocks where set back from 03:00 AM to 02:00 AM to change from summer time (CEDT) to winter time (CET). Which means there is a 1 hour separation between 02:30...
Let's say we have two tables A and B and a join table C that has foreign keys to both A and B and the combination of those foreign keys is unique. One could either do a unique constraint or a comp...
I found a confusing construction in several stored procs in an MS SQL 2008 R2 database: DATEADD(dd, 0, DATEDIFF(dd, 0, some_date)) As I understand it, these are the relevant function signatures: D...
I just completed my first install of SQL as a server-based, Enterprise Edition. I wanted to check it out using SSMS on PC using my Admin Access. But could not connect. For security reasons my adm...
Sometimes, either to reduce the amount of typing big table names or when joining a table to itself one will need to alias a table. Personally I find SQL statements with aliases harder to read and a...
I have some SQL scripts that contain DDL to create tables and schemas for a database. I'd like to be able to comment this SQL and then use those comments to generate output documentation (in HTML)...
I have two tables with millions of records. Every so often I need to join them and exclude just a handful of records where a bit(1) column is set to 1 instead of 0. I can do it with either, WHERE ...