Posts

Showing posts from March, 2019

Cheap and good prepaid SIM Card (Australia)

If you are in Australia looking for mobile prepaid plan this would be  a good deal to consider. I've signed up with $10/month (no contract) Belong Mobile (Telstra network) small plan with the following benefits: 1. Unlimited data (1GB 4G speed and the rest shaped to 64kbps). 2. Unlimited call and text within Australia. 3. Unused high speed data quota (1GB) will be rolled over to the following months. How good is that? If you use the following link to subcribe, you and I each will get $20 free credit (two months free): https://www.belong.com.au/iaf?promo=IAFNB7XVQ Happy days

Scheduling PowerShell to import SPListItem version history into CSV file

Image
Problem I need to populate SQL table to store permanent and temporary address changes from SPList item version history. I need to store the first version and subsequent versions only if the address is updated. All will be stored as CSV file with latest address (version) first. Since the following script will be run as Windows Scheduled Task, it will also rename $csvFileName with original date/time stamp before creating a new one. Solution # Import list item version history of RP content type to CSV file / SQL table # Created by Ben - 7 March 2019 clear start-transcript if ((gsnp '*sharepoint*' -ErrorAction SilentlyContinue) -eq $null ){asnp *sharepoint*} $currentPs1Filename = $MyInvocation .MyCommand.Name $currentPs1FilePath = $MyInvocation .MyCommand.Definition $currentPs1Folder = $currentPs1FilePath .SubString(0, $currentPs1FilePath .indexOf( $currentPs1Filename )) $siteUrl = 'http://your-target-site-url' $csvFileName = 'RPAddressHistory.csv&#

T-SQL to concatenate multiple rows of DateTime column

Image
Problem  I need to concatenate the following EventDate (latest to oldest) into a single row grouped by ParentWebGuid on Microsoft SQL 2008 R2 database view: SELECT TOP ( 100 ) PERCENT ParentWebGuid , TypeOfEvent , CONVERT ( VARCHAR ( 10 ) , EventDate , 103 ) AS EventDateString FROM dbo . SupervisionEvent WHERE ( TypeOfEvent = 'Visit [P]RP' ) ORDER BY ParentWebGuid , EventDate DESC Solution SELECT DISTINCT TOP ( 100 ) PERCENT ParentWebGuid , REPLACE ( ( SELECT TOP ( 100 ) PERCENT CONVERT ( VARCHAR ( 10 ) , EventDate , 103 ) AS 'data()' FROM dbo . SupervisionEvent WHERE ( TypeOfEvent = 'Visit [P]RP' ) AND ( ParentWebGuid = mainTable . ParentWebGuid ) ORDER BY EventDate DESC FOR XML PATH ( '' ) ) , ' ' , ', ' ) AS VisitPrpEventDates FROM dbo . SupervisionEvent AS mainTable WHERE ( TypeOfEvent = 'Visit [P]RP' ) Explanation AS   'data()&

Belong NBN or Mobile $20 discount

I've just connected my home to Belong NBN and mobile servicec and I'm very happy with the speed and price. If you click the following link to join, you can get $20 discount on your first bill. https://www.belong.com.au/iaf?promo=IAFNB7XVQ