Posts in category “Tips”

Keep the the same order as input data when using `WHERE fieldName IN(fieldVal1, fieldVal2)`

Don't waste time; here's the sample code with the Oracle database.

SELECT * FROM SampleTable WHERE sample_field in (7,3,4,6) ORDER BY INSTR(',7,3,4,6,',  ',' || sample_field || ',');

Two useful links from google photos you might not know

Unsaved creations

https://photos.google.com/unsaved

Possibly all creations?

https://photos.google.com/foryou

MySQL IF(EXPRESSION, A, B) equivalent in PL/SQL (Oracle)

In MySQL, we can

SELECT IF(A IS NULL, "something", A) FROM some_table;

If you want to do a similar thing in PL/SQL, you need to

SELECT (CASE WHEN A IS NULL THEN "something" ELSE A END) FROM some_table;

If you want to get the first non-null value from several fields, you have a better choice than using the CASE keyword.

SELECT COALESCE(A, B) FROM some_table

see more information about the Oracle COALESCE function

Quickest fix: Windows - Taskbar Has Disappeared from the Desktop

  1. Press Alt + Ctrl + Del => choose Task Manager
  2. find the Windows explorer process,
  3. Restart it.

PS: If you use a remote desktop, Press Alt + Ctrl + End instead. It's actually not a fix; it's only a workaround. Anyway, we cannot expect there to be a perfect fix for that. Microsft just sucks.

Set bash terminal integration with Visual Studio 2019