If you don't have a permission to edit the System variable on your local window machine, the following hack might work
select
CASE
When (table.field1 = '01')
THEN
CASE
When (SUBSTRING_INDEX(table.field1, ' ', 1) = 'abc')
THEN '01abc'
ELSE 'abc'
END
WHEN (table.field1 = '02')
THEN
CASE
When ((SUBSTRING_INDEX(table.field1, ' ', 1)) = 'def')
THEN '02def'
ELSE 'def'
END
When (table.field1 = '03')
THEN
CASE
When ((SUBSTRING_INDEX(table.field1, ' ', 1)) = 'efg')
THEN '03efg'
ELSE 'efg'
END
WHEN (table.field1 = '04')
THEN
CASE
When ((SUBSTRING_INDEX(table.field1, ' ', 1)) = 'pqr')
THEN '04pqr'
ELSE 'pqr'
END
END
from table ;
git reset --hard origin/yourbranch
git push -f origin last_good_commit_hash:yourbranchexample : git push -f origin 4d875f7e3e8:develop
package com.mytech.today; public class PalindromeClient { public static boolean isPalendrome (String s) { if(s== null) { throw new RuntimeException("null value passed"); } int n = s.length(); if(n==1) return true; else { for (int i=0; i < n/2 ; i++) { if(s.charAt(i)!=s.charAt(n-i-1)) { return false; } } } return true; } public static boolean isPalendromeRecurrsive (String s) { if (s.length()<2) { return true;} else if (s.charAt(0)==s.charAt(s.length()-1)) { return isPalendrome(s.substring(1, s.length()-1)); } else return false; } public static void main(String[] args) { System.out.println(isPalendrome("levvel")); System.out.println(isPalendrome("manaplanacanalpanama"));
System.out.println(isPalendrome("a")); System.out.println(isPalendrome("jptt aefa afdaf")); System.out.println(isPalendromeRecurrsive("levvel")); System.out.println(isPalendromeRecurrsive("manaplanacanalpanama"));
System.out.println(isPalendromeRecurrsive("a")); System.out.println(isPalendromeRecurrsive("jptt aefa afdaf")); } }
©mytechtoday.com 2006-2010