14
9
u/melonfarmermike Dec 06 '19
Santa Claus is in contravention of article 4 of the General Data Protection Regulation (EU) 2016/679
2
5
11
4
4
2
2
2
3
u/Damien_J Dec 06 '19
VARCHAR for Behaviour when he could have used BIT for Good instead?
IF Good = 0 THEN Presents = 0;
5
u/DrSmus Dec 06 '19
WHEN good = 0 THEN 0
ELSE 1
END AS Presents1
u/farhil SEQUEL Dec 06 '19
If NULLs are allowed, this would give contacts with a NULL behavior presents, which may not be desired.
Also, if both Presents and Good are BIT values, then you could simply do
Good AS Presents1
0
Dec 06 '19
[deleted]
4
2
u/farhil SEQUEL Dec 06 '19
If all nice contacts get presents and no one else does, you can eliminate the need to filter on behavior by performing an inner join on presents.
23
u/NakedLoki Dec 06 '19
Santa knows not to Select *, he's only pulling specifics!