I am transferring some SQL query into C# code, now I am having problem understand the following query.
So far my understanding to the following query is: If PREFIX
is between 0
to 99
, then trim PREFIX
, but what does || '-' ||
mean here? My understanding for line 3 is after finishing the trim function in line 2, do another trim, but I do not recognize the syntax in line 3 either . This is DB2.
RETURN CASE WHEN PREFIX BETWEEN '00' AND '99' //line 1
THEN TRIM(PREFIX) || '-' || //line 2
TRIM(TRIM(L '0' FROM DIGITS(CLNUMBER))) //line 3