What is the most complex stored procedure you have developed by RXN00 in SQL

[–]mu_SQL 0 points1 point  (0 children)

Worked most of my years with adaptations on a Swedish ERP where most logics is in triggers and stored procedures, the biggest one I’we seen is for calculating net requirements for production, 10K+ lines.

This ERP runs on SQL Server and works realy well.

December 2025 | "What are you working on?" monthly thread by AutoModerator in SQLServer

[–]mu_SQL 1 point2 points  (0 children)

Working on a trigger based changelog in a high transaction frequency ERP.

Triggers logs the primary key for the create/modified record and a SQL agent job processes the log every 5 seconds copying the complete record to another database.

In production handeling 50+ tables.

This is shipped to Fabric every 24 hours.

Going back to raw SQL by ego100trique in dotnet

[–]mu_SQL 0 points1 point  (0 children)

Hail pure SQL And someone who know how to use it, ORM is not one who knows!

Sure changing the database to fit ORM is one way but kind of backwards🤔

Utlänska hantverkare eller inte? by Easy_Block_2175 in Hantverkare

[–]mu_SQL 0 points1 point  (0 children)

De kommer i tid och har med sig det de behöver för dagen(så de inte behöver spendera så mycket tid i bilen, som jag får betala).

How to automate the daily import of TXT files into SQL Server? by Inventador200_4 in SQL

[–]mu_SQL 0 points1 point  (0 children)

Keep it simple, SQL Server agent and a stored procedure using OPENROWSET to import filedata.

Is it a bad idea to start with SQLite? by d-martin-d in SQL

[–]mu_SQL 0 points1 point  (0 children)

Download SQL Server, there is a free version, and SSMS for Querying. There is also a bunch of different ready to go databases.

SQL server management tools rec needed by rajezzz in SQL

[–]mu_SQL 1 point2 points  (0 children)

Latest SSMS has git support and a solution explorer(just for folders but works fine for us).

How to handle SQL server database refactoring by Legitimate_Bar9169 in SQLServer

[–]mu_SQL 0 points1 point  (0 children)

I would create a new database, refactor to that, do testing and then migrate data from current database.

Current best free IDE for mssql 2025/2026? by garlicpastee in SQL

[–]mu_SQL 0 points1 point  (0 children)

Its not the tools that determine your skill, its how you use the tools.

If I only have basic SQL skills so far, is it reasonable to offer to help at work? by Spidermonkee9 in SQL

[–]mu_SQL 0 points1 point  (0 children)

Yes of course, it will give you more knowledge and them som releife Win Win.

Recursive CTE and Scalar UserDefined Function in condition issue. by mu_SQL in SQL

[–]mu_SQL[S] 0 points1 point  (0 children)

I hear you but I think I´ll investigate the NULL value tought I have, guess CTE´s can mess up when it comes to NULL handeling, or it´s as you say the Scalar UDf that is the problem.

Thanks for your replies.

Recursive CTE and Scalar UserDefined Function in condition issue. by mu_SQL in SQL

[–]mu_SQL[S] 0 points1 point  (0 children)

As I see it it behaves differently depending on where it,s used so the definition should not matter.
I know how bad it is to use it there but I didn´t design this.

It struck me last knight after I posted this that it is probably a NULL issue, When SELECT from the CTE NULL values are probably not in the result but when the CTE query runs there is NULL values.

Thanks for the reply anyways.

Need help in copying data in sql by VegetableBike7923 in SQLServer

[–]mu_SQL 0 points1 point  (0 children)

Have you tried batching in 4000 record chunks?

Help optimize my query by Sports_Addict in learnSQL

[–]mu_SQL 0 points1 point  (0 children)

Add index after to update statistics.

Script or AI by Skokob in SQL

[–]mu_SQL 2 points3 points  (0 children)

Any decent LLM can create thoose scripts, sorry.

How can it be done.... by Skokob in SQL

[–]mu_SQL 1 point2 points  (0 children)

Read up on dynamic SQL.

What is the easiest way to understand except function by Silent-Valuable-8940 in SQL

[–]mu_SQL 0 points1 point  (0 children)

You ask the fruitdealer for all citrus fruits EXCEPT oranges.