Shabat Closer

Monday, December 30, 2013

TECH - Exchange 2010 : No existing ‘PublicFolder’ matches the following Identity. ‘\’.

TECH - Exchange 2010 :  No existing ‘PublicFolder’ matches the following Identity. ‘\’.

Error:
No existing ‘PublicFolder’ matches the following Identity. ‘\’.  Make sure that you specified the correct ‘PublicFolder’ Identity and that you have the necessary permissions to view ‘PublicFolder’.  It was running the command ‘get-publicfolder -getchildren -identity ‘\’ -server ExchangeServer

Solution:
  1. I try to fix the homeMDB  homeMTA  in ADSI Edit but it's not fix my problem
  2. I remove my admin mailbox and create it again. <- that's fix my problem.

Sunday, December 29, 2013

Mysql - Function : Count Occurence of Character in a String / Word

Mysql : Count Occurrence of Character in a String / Word  Function

CREATE FUNCTION `getCount`(`myStr` VARCHAR(4096), `myword` VARCHAR(100)) RETURNS int(11)
    READS SQL DATA
    DETERMINISTIC
RETURN 
    ROUND (   
        (
            LENGTH(myStr)
            - LENGTH( REPLACE ( myStr, myword, "") ) 
        ) / LENGTH(myword)        
    )




Usage :



Select  getCount('Moshe Test My Code','M')
#Returns : 2