Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7184357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:11:06+00:00 2026-05-28T18:11:06+00:00

I have a indexed view where I basically need to do this SELECT …

  • 0

I have a indexed view where I basically need to do this

SELECT ... 
    CASE 
         WHEN ISDATE(ColumnName) = 1 THEN CONVERT(datetime, ColumnName, 103) 
         ELSE NULL 
    END AS ViewColumn
....

Trying to create the index yields:

Cannot create index on view
‘….’. The function
‘isdate’ yields nondeterministic results. Use a deterministic system
function, or modify the user-defined function to return deterministic
results.

MSDN says

ISDATE is deterministic only if you use it with the CONVERT function,
if the CONVERT style parameter is specified, and style is
not equal to 0, 100, 9, or 109.

here http://msdn.microsoft.com/en-us/library/ms187347.aspx.

But I don’t know what that means at all. As far as I can tell, I am using it with a CONVERT function….

Any way to work around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:11:07+00:00Added an answer on May 28, 2026 at 6:11 pm

    It should be, if at all:

    SELECT ... 
        CASE 
             WHEN ISDATE(ColumnName) = 1 THEN CONVERT(datetime, ColumnName, 103) 
             ELSE NULL 
        END
    ....
    

    but, you are not using ISDATE WITH CONVERT, since there is no expression like

    ISDATE(CONVERT(varchar,ColumnName,112)) 
    

    without the nested convert the return value is dependend on things like language settings, hence it’s nondeterministic behaviour. Without “external” knowledge, it’s not possible to predict the result one is getting, based on the input alone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of records indexed by id numbers, I need to convert
I have an indexed view that I need to specify the noexpand hint for
I have the following indexed view: ALTER View [CIC].[vwCoaterC473Heat] WITH SCHEMABINDING AS Select id
I have created an indexed view: CREATE VIEW LogValueTexts WITH SCHEMABINDING AS SELECT ISNULL(LRVS_SLOG_ID*256+LRVS_IDX,0)
In C# you can not have indexed properties. That said, how do I convert
I have an indexed array which I've generated from an associative array with this
I have a description field indexed in Lucene.This field contains a book's description. How
I have a domain with a loto of indexed pages, I use this one
Possible Duplicate: Is it possible to have an indexed view in MySQL? Possible duplicate:
Does anyone have experience with using indexed view in MS SQL Server 2008? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.