switchoffset() error with INNER JOIN, works with other kinds of JOIN and on SQL2012 - by Ådne Hovda

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 790376 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 6/18/2013 6:52:31 AM
Access Restriction Public


There's a problem with the switchoffset() and todatetimeoffset() functions when used in combination with INNER JOIN. This is the error I get: "The timezone provided to builtin function switchoffset is invalid." I have verifed that the input to the time_zone parameter is within the valid range and not NULL. I'm building a localized time table by joining a series of timestamps with time zone offset rules, and I have not found a way to work around this problem. Tested on developer and standard editions of SQL Server 2008 and 2008 R2, with and without service packs, and on different operating systems and processor architectures.
Sign in to post a comment.
Posted by Microsoft on 7/18/2013 at 2:18 PM
Thank you for reporting this issue. The issue has been resolve, and a fix is available in SQL Server 2012. Thanks again for reporting the product issue and continued support in improving our product.
Posted by kRAThor on 7/8/2013 at 8:46 AM
I get this error w/ a left join. The join doesn't even reference a datetimeoffset column.
Posted by Ådne Hovda on 6/27/2013 at 5:37 AM
Why has this issue simply been closed as won't fix without even a comment, when the problem is clearly a bug in the product, affecting several of our customers?