Bunch's Blog

One day I'll have a catchy subtitle, one day
posts - 87 , comments - 125 , trackbacks - 0

May 2011 Entries

CTE Updating
Using a CTE to help with an update can be pretty handy. In this simple example the CTE is to select SiteIDs for a specific sales rep. The update is to change the address code to ‘Street’ since the rep entered them all in as ‘Mailing’ by mistake. In the update code you use an inner join to match up the SiteIDs from the CTE with the ones in tblAddress so you only update the specific sales rep’s sites and not all of them in the table. WITH CTE(SiteID) AS ( SELECT srs.SiteID FROM tblSalesRepSites srs ......

Posted On Friday, May 27, 2011 12:47 PM | Comments (0) |

Short Circuiting Forgetfulness in VB.Net
If nobody else but me reads this that is OK, this is just something I forget from time to time when working in VB.Net. To short circuit an expression the && or || operators in many other languages are AndAlso or OrElse in VB.Net. Two really simple examples: If a > b AndAlso a < c Then If a > b OrElse a > c Then Technorati Tags: VB.Net ......

Posted On Monday, May 2, 2011 11:47 AM | Comments (0) |

Powered by: