March 15, 2012

WHERE clause on SQL Server “Text” data type

SELECT * FROM @Village WHERE [CastleType] like 'foo' 
 
SELECT * FROM [Village] WHERE PATINDEX('foo', [CastleType]) <> 0

How to Escape Single Quotes in SQL2005

To fix the error mentioned above, escape single quotes with two single quotes as displayed in following example.

USE AdventureWorks
GO
SELECT *
FROM Person.Address
WHERE City = 'Villeneuve-d''Ascq'
GO

March 12, 2012

Reply above quoted message

The mail.identity.default.reply_on_top preference sets the default value for the reply text position for each account/identity. It defaults to 0, to have the reply at the bottom. You can use the Config Editor at Tools -> Options -> General to set it to 1 to have the reply on top.

March 11, 2012

Move all numbers from “Other Phone” to “Mobile Phone” field in Outlook contacts

 
Use Powershell to run this script
$outlook = new-object -com outlook.application
$contacts = $outlook.Session.GetDefaultFolder(10)
$contacts.Items | % { if($_.MobileTelephoneNumber -eq "") { $_.MobileTelephoneNumber = $_.OtherTelephoneNumber; $_.OtherTelephoneNumber = ""; $_.save() } }

Move all numbers from “Other Phone” to “Mobile Phone” field

 
Use Powershell to run this script
$outlook = new-object -com outlook.application
$contacts = $outlook.Session.GetDefaultFolder(10)
$contacts.Items | % { if($_.MobileTelephoneNumber -eq "") { $_.MobileTelephoneNumber = $_.OtherTelephoneNumber; $_.OtherTelephoneNumber = ""; $_.save() } }

select date from xx to xx

select * from table x

where date filed between date_from and date_to

openldap notes


ldapadd -x -D "cn=jimbob,dc=example,dc=com" -f step-1.ldif -w dirtysecret
slapd -d 63 -h "ldap:/// ldaps:///"

ldapadd -D "cn=sfitel, dc=my, dc=com" -f step-1.ldif -w cook

How to type letters with accent

Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/