Browsed by
Tag: SQL 2008

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

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

Case expressions may only be nested to level 10

Case expressions may only be nested to level 10

I was working on a rather lengthy query that used a typical CASE WHEN THEN ELSE END sequence, but it kept telling me “Case expressions may only be nested to level 10”, even though I wasn’t nesting or doing something unique with them, just like this: case when field1 = ‘data’ then ‘data1’ when field1 = ‘datax’ then ‘data2’ when field1 = ‘datay’ then ‘data3’ when field1 = ‘dataz’ then ‘data4’ when field1 = ‘dataa’ then ‘data5’ when field1 =…

Read More Read More