Tag Archives: TSQL

I hate SQL. One way of doing a subquery in a JOIN statement

I really do. I’m writing this mostly for myself because I never remember this shit. I wrote this query  now but I know that I won’t remember how to do this in future, so here is the public note to … Continue reading

Posted in Database, SQL | Tagged | 1 Comment

How to insert multiple literals explicitly into a table, only if they don’t already exist

It might seem silly, but recently I needed to insert some values into a new table I added to a system, but only if those values didn’t already exist, and I did not know how. (Yes, it’s a new table … Continue reading

Posted in SQL | Tagged , | Leave a comment