Browsed by
Tag: SQL 2005

Validating email string without using sp_OACreate in T-SQL

Validating email string without using sp_OACreate in T-SQL

I wanted a way to validate that an email address in a SQL query was well-formed, and found a lot of resources suggesting to create a scalar function that invokes sp_OACreate among others, and return a bit indicating if it was valid or not.  That works great, but not for those of us in heightened security environments, where granting execute permissions to system stored procs and functions is not permitted.  After searching around I came up with the following function:…

Read More Read More

Get first occurance of a character in SQL

Get first occurance of a character in SQL

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 today (Sept 2009) in SQL for a substring portion of a query I was creating, those obviously aren’t available. Well, in Oracle InStr is available I understand, but we`re talking about SQL. To get the first occurrence of a character in a TEXT field…

Read More Read More

24 Hours of PASS registration open

24 Hours of PASS registration open

Registration is open for 24 hours of PASS in March! Go to http://bit.ly/fMzarY to register. This one is “Celebrating Women in Technology” and has some great sessions lined up, including discussions on T-SQL, SSRS, SSIS, performance, MDX, even Twitterdata in Azure! You don’t want to miss this!

24 Hours of PASS – March 15-16 2011

24 Hours of PASS – March 15-16 2011

The 24 Hours of PASS is returning March 15th-16th 2011, and they’re looking for feedback on which sessions to include! If you’d like to participate, the link to the survey can be found here. I chose the ones I’d like to see, be sure to stop by and make your selections for your favorites! I’m looking forward to another great set of informative sessions! If you haven’t done the 24 Hours of PASS yet, it’s definitely worth attending! If you…

Read More Read More

Long SQL query time and account permissions

Long SQL query time and account permissions

My good friend @MichaelPerillo and I were recently discussing the possible cause for a SQL query to take an excessively long time, even though proper measures had been taken to ensure performance tuning had taken place. He made a suggestion that I believe is noteworthy, so I’m putting it here, also so I can reference it later. A transactional SQL database performs each transaction in a queue, assigning each transaction a queue request. Queue requests are prioritized not only by…

Read More Read More