Home Dashboard Directory Help
Search

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


Status: 

Resolved
 as Won't Fix Help for as Won't Fix


2
0
Sign in
to vote
Type: Bug
ID: 790376
Opened: 6/18/2013 6:52:31 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

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.
Details
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?
Sign in to post a workaround.