Skip to main content

Questions tagged [tsql]

2votes
2answers
163views

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
1vote
2answers
82views

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
-1votes
1answer
183views

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
3votes
4answers
1kviews

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
3votes
1answer
146views

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
-1votes
2answers
800views

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
0votes
1answer
100views

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 anytime)...
Quoran's user avatar
4votes
2answers
132views

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
1vote
2answers
109views

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
-1votes
1answer
153views

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
1vote
2answers
211views

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
-1votes
2answers
2kviews

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
4votes
2answers
944views

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
5votes
3answers
25kviews

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
3votes
1answer
221views

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

153050per page
close