Browsed by
Category: Code

Get the first occurrence of a character in SQL

Get the first occurrence of a character in SQL

(Originally posted September 2, 2009) When I need to know the first (or any) occurrence of a character, I’m used to saying something like InStr() for VB or ASP, or String.IndexOf() in .Net, but when I tried to do something like this in SQL for a substring portion of a query I was creating, those obviously aren’t available. In Oracle InStr is available, but we`re talking about SQL. To get the first occurrence of a character in a TEXT field (emphasis…

Read More Read More

Enabling editing of SQL 2000 DTS in SSMS 2008 R2

Enabling editing of SQL 2000 DTS in SSMS 2008 R2

We have some old SQL 2000 DTS Packages that we still maintain, and I’m not continuing to install SQL Enterprise Manager on future versions of my OS just to edit these things, I should be able to edit them in SSMS right?  Well, yes, but it requires a couple of steps, that so far in my Google research is never complete…it’s always a part of the entire solution. (PINTA) Well, here’s the entire solution: First, go to http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11988 and download/install the SQLServer2005_BC.msi…

Read More Read More

Custom presence in Lync 2010

Custom presence in Lync 2010

I enjoyed using custom presence in Communicator 2007, but when our enterprise switched to Lync 2010 a few months ago, my custom presence migrated through until I switched to a new PC, then the old method of enabling custom presence failed.  Why?  One registry entry… Here’s how to do it: Create a string key in HKCUSoftwarePoliciesMicrosoftCommunicator called CustomStateURL and give it a value of the path to an OCS presence XML file, such as file:///c:/program files/Microsoft Office Communicator/OCSPresence.xml Now, also…

Read More Read More

Windows 8 Developer Preview

Windows 8 Developer Preview

Following the //build/ conference in Anaheim, I downloaded a copy of Windows 8 developer preview (32 bit) to put on my Dell Mini 12, 1 GHz Atom processor, 1GB RAM, 40GB SSD drive. A little history…I ended up having to put Windows 7 starter edition on it because it was running so horribly.  It came with Windows XP SP3, I installed Windows 7 Ultimate and it killed the performance.  I later changed it to Windows 7 Starter, and performance improved…

Read More Read More

Access Denied due to invalid credentials in IIS7

Access Denied due to invalid credentials in IIS7

I’ve been having issues with a few ASP.Net websites that we’re moving to IIS7 at work.  It didn’t happen to app of them, but to some it would prompt for network credentials, then throw an HTTP 401.1 “Access Denied Due To Invalid Credentials” error.  We’d hunt around for solutions and never find anything that worked.  Finally I tripped over the answer this morning: Open the website in IIS, and under the IIS header double-click on Authentication to open.  Click and…

Read More Read More