Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

case-statement

T-SQL Conditional WHERE Clause

September 20, 2023 by Tarik

I changed the query to use EXISTS because if there’s more than one location associated with a POST, there’d be duplicate POST records that’d require a DISTINCT or GROUP BY clause to get rid of… The non-sargable This will perform the worst of the possible solutions: SELECT p.* FROM POSTS p WHERE EXISTS(SELECT NULL FROM … Read more

Categories sql Tags case-statement, sql, sql-server, tsql, where-clause Leave a comment

How to use patterns in a case statement?

January 14, 2023 by Tarik

Brace expansion doesn’t work, but *, ? and [] do. If you set shopt -s extglob then you can also use extended pattern matching: ?() – zero or one occurrences of pattern *() – zero or more occurrences of pattern +() – one or more occurrences of pattern @() – one occurrence of pattern !() … Read more

Categories bash Tags bash, case-statement Leave a comment

Ruby class types and case statements

November 14, 2022 by Tarik

You must use: case item when MyClass … I had the same problem: How to catch Errno::ECONNRESET class in “case when”?

Categories ruby Tags case-statement, duck-typing, ruby Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa