Viewing 15 posts - 3,106 through 3,120 (of 7,615 total)
I suggest starting with your actual solution, not listing things you would not do first. You can offer to explain why you wouldn't use other possible solutions if they're interested in...
October 18, 2018 at 2:25 pm
;WITH cte_test_data AS (
SELECT * FROM ( VALUES
('00000S123', 'US', 'ITALY'),
('00000BH01', 'UK', ''),
...
October 15, 2018 at 10:07 am
I agree with the other critiques. As to "the guy", he's 100% right, and he should already run, not walk, to another contractor, without delay!
1NF is trivial and...
October 15, 2018 at 9:48 am
Never use ISNULL() in a JOIN (or WHERE) is a good rule.
To avoid issues with NULL, perhaps you could use empty string as no suborder rather than NULL?
October 15, 2018 at 9:36 am
I suggest using MINUTE rather than HOUR as the difference between local and UTC. Yes, some places actually do offset by not-an-even-hour, so, to be safe, use minutes.
October 15, 2018 at 9:33 am
October 12, 2018 at 3:03 pm
set @counter = @counter + 1 /* increment counter */ /* I see this or slight variations of it all the time */
--------------------...
/* not quite...
October 12, 2018 at 1:51 pm
October 11, 2018 at 9:13 am
The easiest and cleanest way to do this would be to create stored proc in the master db, start the name with "sp_", mark it as a system object, and...
October 10, 2018 at 3:56 pm
October 10, 2018 at 2:19 pm
October 10, 2018 at 12:56 pm
SELECT tn.*
FROM (
SELECT NUMBER
FROM dbo.table_name
GROUP BY NUMBER
HAVING COUNT(*) > 1
) AS NUMBER_DUPS
INNER...
October 10, 2018 at 11:13 am
In terms of potential lost performance and wasted resources, this is probably the single dumbest thing:
CREATE TABLE dbo.every_table_created
(
id int IDENTITY(1, 1)...
October 10, 2018 at 10:47 am
Viewing 15 posts - 3,106 through 3,120 (of 7,615 total)