Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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

13 child tags

Use for questions about one or multiple Structured Query Language (SQL) flavours.

In order to get the most helpful answer your question should include the following:

- a specific SQL flavor tag (e.g. for MySQL, PostgreSQL, Oracle, MS SQL Server, IBM DB2)
- table definitions
- sample data if needed
- expected result when query results are not what you expect

For general questions that are not targeting a specific SQL flavor, questions and answers should use ISO/IEC standard SQL.

This tag doesn't have a detailed wiki yet.

77%
+5 −0
Q&A How to break infinite loop in CTE

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...

3 answers  ·  posted 3y ago by artaxerxe‭  ·  edited 19d ago by Michael‭

66%
+2 −0
Q&A Redshift int casting from varchar - how to force early evaluation order?

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...

0 answers  ·  posted 7mo ago by Sigma‭

66%
+2 −0
Q&A Does Snowflake NATURAL JOIN support outer-style join?

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...

1 answer  ·  posted 10mo ago by matthewsnyder‭  ·  edited 9mo ago by matthewsnyder‭

Question sql join snowflake
71%
+3 −0
Q&A How do I return ISO day of week in Redshift?

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...

1 answer  ·  posted 11mo ago by Sigma‭  ·  last activity 11mo ago by trichoplax‭

Question sql format redshift
42%
+1 −2
Q&A Why OFFSET isn't working the way it is expected?

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'...

1 answer  ·  posted 1y ago by billy‭  ·  edited 1y ago by Alexei‭

Question mysql sql
66%
+2 −0
Q&A What's the better way to store base64 in SQLite Database?

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)...

1 answer  ·  posted 2y ago by Anonymous‭  ·  edited 2y ago by Anonymous‭

Question sql base64 sqlite
60%
+1 −0
Q&A Is there any breaking change in regard to TrustServerCertificate property of System.Data.SqlClient for .NET 5?

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 ...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

81%
+7 −0
Q&A SQL timestamp for daylight saving day when clock goes 1 hour back.

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...

1 answer  ·  posted 3y ago by Estela‭  ·  last activity 3y ago by hkotsubo‭

75%
+10 −2
Q&A What are the pros and cons of a composite primary key versus a unique constraint?

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...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

80%
+6 −0
Q&A How are integers interpreted in contexts that expect a date?

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...

1 answer  ·  posted 3y ago by ajv‭  ·  edited 3y ago by Alexei‭

Question sql tsql sql-server
71%
+3 −0
Q&A Error: 18456, Severity: 14, State: 5; SSMS > Network sever from PC

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...

1 answer  ·  posted 3y ago by James Jenkins‭  ·  edited 3y ago by Alexei‭

80%
+6 −0
Q&A Is there a naming convention for table aliases?

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...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

75%
+4 −0
Q&A How can I generate documentation from comments in SQL DDL?

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)...

0 answers  ·  posted 3y ago by Monica Cellio‭  ·  edited 3y ago by Monica Cellio‭

81%
+11 −1
Q&A Why would excluding records by creating a temporary table of their primary keys be faster than simply excluding by value?

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 ...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭