Outer-Apply

Tag: outer-apply

Msg 195: STRING_SPLIT Is Not a Recognized Built-In Function Name

Msg 195: STRING_SPLIT Is Not a Recognized Built-In Function Name

Yesterday, I was writing some Transact SQL to dust off the cobwebs. I got confused when I was playing around with the STRING_SPLIT function, and kept getting the error:

Msg 195, Level 15, State 10, Line 2
'STRING_SPLIT' is not a recognized built-in function name.

I checked my database compatibility level, which must be 130 or higher for the function to be available. My database compatibility level was 160, so that was fine.

Continue reading

CROSS APPLY in T-SQL: Why to APPLY

CROSS APPLY in T-SQL: Why to APPLY

Michelle asked a great question:

In your own words, why would one want to use a cross apply operator rather than a join operator? I’m old school, and I’m just not getting why a cross apply would be so much better to use than a join.

Continue reading

Using APPLY for calculations

Using APPLY for calculations

By Kendra Little on March 29, 2011

Here’s a little TSQL snack. I picked this up in a presentation by Itzik Ben-Gan at the PNWSQL user group recently, and it’s become a fast favorite.

Continue reading