Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [tsql]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
159 views

Do we have 2 logical query processings, one with indexes and one without indexes?

In the book "Inside Microsoft® SQL Server® 2008: T-SQL Programming" the behaviour of a sql query is explained. The following picture is taken from the book. I have some questions about the ...
jwa's user avatar
  • 29
1 vote
2 answers
77 views

How to write robust or alternative to TSQL data processing routines in SqlServer?

My company has a workflow that involves ingesting huge amounts of raw data from external sources into SqlServer and then interpreting and weaving that data into our own application tables. This ...
Joshua Frank's user avatar
-1 votes
1 answer
180 views

What advantage is gained by continuing to not provide an UPSERT statement in T-SQL (or any given major SQL dialect)?

This question is asking about a generally applicable engineering principle. It is using T-SQL as a specific example, but the question is about the engineering principles behind major SQL dialects in ...
Panzercrisis's user avatar
  • 3,173
3 votes
4 answers
1k views

Unit testing Systems with Logic Tightly Coupled with Data

I understand there are many questions in this site revolving around the same concept, but I could not get a precise answer for my case. Problem I am handling an ERP System, with code base in both: ...
A.Rashad's user avatar
  • 604
3 votes
1 answer
141 views

T-SQL Development debate, which is the correct approach

The company I work at uses stored procedures (and a home-grown ORM) exclusively for all database interaction, selects, updates, deletes. We have numerous procs that will insert and/or update and/or ...
ganders's user avatar
  • 411
-1 votes
2 answers
734 views

SQL query - split and run parallely?

I have a master table T1 which has 1000 records and a ColRef a key column. There are lots other tables all linked by ColRef. I have a Stored procedure which takes few hours to process. I want to ...
KarTk's user avatar
  • 1
0 votes
1 answer
95 views

Why storing a payroll in XML type field would be good or bad

We have a PAYROLL issues by the client to make it dynamic i.e. to make the whole process computerized. It includes: Employees Allowances (Scale wise, which could change yearly or monthly or ...
Quoran's user avatar
  • 9
4 votes
2 answers
124 views

Why are triggers seen as a last resort to solve multiple paths in cascading deletes?

There is a problem using ON DELETE CASCADE on foreign keys in a SQL database if there are multiple paths from the root foreign key to the leaf. The way around this seems to be to replace the ON DELETE ...
dumbledad's user avatar
  • 317
1 vote
2 answers
107 views

DB Design for non static front-end

I have a question about best practices to design a database which have to hold the following data: There is a page with a questionnaire which has default questions like Firstname, Lastname, Street... ...
serious's user avatar
  • 111
-1 votes
1 answer
152 views

MS SQL Server Cell level Encryption options [closed]

Recently, i got the task of doing some research into the data encryption at the cell level. I tried using the Symmetric key (by passphrase) & second option i took is Symmetric key (by Certificate)....
Karan's user avatar
  • 366
1 vote
2 answers
204 views

Is there a difference between SQL INSERT patterns

SQL inserts are usually documented like so: INSERT TableName (Column1, Column2) VALUES ('Value1', 'Value2') However, in TSQL it's also possible to write the (seemingly) same statement like so: ...
JC Ford's user avatar
  • 131
-1 votes
2 answers
2k views

Storing Dates & Times in SQL [closed]

I have a tool that I am working on which allows people to create meetings. They can select the Date, Time & Timezone that this meeting is occurring in. I need to determine the best way to store ...
SBB's user avatar
  • 109
3 votes
2 answers
933 views

An algorithm that spreads similar items across a list

I need an algorithm that distributes same items across a list, so maximizing the distance between occurrences. E.g. I have a list of 15 items: {a,b,c,c,c,d,e,f,f,f,g,h,h,i,j} The algorithm should ...
Robert van Dijk's user avatar
5 votes
3 answers
22k views

Combine union with distinct

Situation: I need distinct results from two tables, that both have duplicates. I would like to know if I should combine UNION and DISTINCT. Example 1 - Only use distinct SELECT DistinctValue FROM ...
annemartijn's user avatar
3 votes
1 answer
215 views

How can I improve quality on SQL reports?

I've recently ran into some issues where some reports were not generating the proper results. We already have a QA department that reviews the reports and then our business owners review them as well; ...
UnhandledExcepSean's user avatar
2 votes
5 answers
2k views

Architecture strategies for a complex competition scoring system

Competition description: There are about 10 teams competing against each other over a 6-week period. Each team's total score (out of a 1000 total available points) is based on the total of its scores ...
MikeWazz's user avatar
7 votes
4 answers
6k views

Should I Do Calculations in T-SQL or Program?

I am creating a stored procedure that is logging some data. The data ultimately needs to end up in 2 tables. The incoming data is coming from a JSON string containing 15 parameters, and the data is ...
jwatts1980's user avatar
0 votes
7 answers
783 views

What are the pros and cons for having a dedicated T-SQL developer on your team?

Our T-SQL developer just gave his two weeks notice. We have been asked if our team of four developers would like an additional developer. We are offered to do our own T-SQL / Entitiy Framework ...
Rodney Hickman's user avatar
-1 votes
2 answers
583 views

Will TSQL become useless because of new ORMs? [closed]

By introducing LINQ to SQL, I found myself and my .NET developer colleagues gradually moving from TSQL to C# to create queries on the database. Entity Framework made that shift almost permanent. Now ...
Saeed Neamati's user avatar
4 votes
5 answers
4k views

I feel unprepared to start my first job out of college... how can I improve? [closed]

I just graduated from university with a degree in Computer Science/Engineering and was fortunate enough to land a job working in the pharmaceutical industry as a developer. My title is System ...
Evan Williams's user avatar
60 votes
24 answers
71k views

How can I explain the difference between NULL and zero?

Working on a problem that uses the percent change formula: percent change = 100 * [(new value - old value) / old value] How would I explain the difference if new value or old value = NULL, rather ...
4 votes
1 answer
169 views

Is there another name for Sql Azure's programming language?

According to this page on MSDN the sql language used on Sql Azure is called transact-sql (the same as on sql server). But is this the only way to refer to programming on Sql Azure? The Sql Azure ...
amelvin's user avatar
  • 1,535
4 votes
2 answers
3k views

Bill of materials database design in EF codefirst?

I'm having trouble generating a proper database design for bill of materials in EF Code-first I just need a general structure then ill add additional fields So i need to have a Product that is ...
user avatar
231 votes
19 answers
149k views

Why is naming a table's Primary Key column "Id" considered bad practice? [closed]

My t-sql teacher told us that naming our PK column "Id" is considered bad practice without any further explanations. Why is naming a table PK column "Id" is considered bad practice?
4 votes
3 answers
5k views

How to reach to the advanced level in SQL? [closed]

I think I have a good grasp of SQL and the most features it has, but sometimes when I've done some more advanced Reporting Services a fellow developer has helped me with some stuff and when I open ...
marko's user avatar
  • 1,103
0 votes
4 answers
1k views

Using TSQL for the first time some basic instructions

I am writing an application that will use many tables and I've been told that I must not use stored procedures in this project because it will be too slow. It has been suggested that I use TSQL. I ...
Alton Book's user avatar
9 votes
3 answers
2k views

How do you handle constantly changing database dimensions?

For the last two months or so I have been looking for solutions or practices to handle release management within databases. I'm looking for what people view as the best process for handling this. We ...
judda's user avatar
  • 193
-2 votes
3 answers
2k views

SQL problems and answers book for a functioning SQL programmer [closed]

It was pointed out to me yesterday that I need to get a book on SQL and learn about it properly. That is probably a fair assessment; I'm a functioning SQL programmer who can in general extract from ...
user avatar