Answer the question
In order to leave comments, you need to log in
Is grouping of selection conditions supported in MSSQL?
Not very strong in SQL and for the purposes of my own knowledge I created a small table (roughly)
CREATE TABLE [test]
(
[id] int,
[column_A] int,
[column_B] bit,
[column_C] int,
[column_D] bit,
[column_Z] bigint
);
SELECT * FROM [test]
WHERE [column_Z] = 3 AND (([column_A] = 2 AND [column_B] <> 0) OR ([column_C] = 2 AND[ columnD] <> 1))
SELECT
involves a selection in which the conditions are grouped. In a sense, this should declare (I think so) the order in which the conditions are checked, is it? ... or SQL itself determines this order to optimize query execution and therefore the grouping of conditions will not work, i.e. brackets are ignored. Wednesday - MSSQL 2016.
Answer the question
In order to leave comments, you need to log in
Parentheses are naturally taken into account. But sql can implement the order of checks in its own way due to its knowledge of data insider.
Bitrix was specially created in such a way that only their developers understand what kind of heresy is written in the code, so that clients do not run to freelance
This can theoretically be called code if you remove the html and bring it to PSR1|2 . The request /?_SERVER[DOCUMENT_ROOT]=/any
does not return any errors? If so, then you still have a hole in the server settings.
Using array parameters requires good documentation, otherwise maintaining such code can be very difficult.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question