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 8110421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:44:55+00:00 2026-06-06T01:44:55+00:00

Is it possible to index a persisted field? When trying to change a primary

  • 0

Is it possible to index a persisted field?

When trying to change a primary key to a persisted field or
add a primary key to a field I’ve made persisted field I get the following:

Cannot define PRIMARY KEY constraint on nullable column in table
‘tblOpportunityRecords’.

  • 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-06-06T01:44:56+00:00Added an answer on June 6, 2026 at 1:44 am

    In order to male your computed field non-null, you need to help SQL Server figure out that no nulls are possible. Usually, this is done using the ISNULL function which can be used to ensure that the resulting expression is non-nullable.

    ISNULL(my_computation, 0) --the second arg should have the same type as the first one
    

    Note, that you can’t use the COALESCE function (for a reason unknown to me – it just doesn’t work).

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

Sidebar

Related Questions

Is it possible to query an Index made with Lucene.NET through a PHP front-end?
Possible Duplicate: Multiple index variables in PHP foreach loop I am trying to create
Possible Duplicate: (C#) Get index of current foreach iteration Good morning, Is there any
Possible Duplicates: How to get index of <li> element jQuery - get the index
Possible Duplicate: Css z-index problem Is there away that I can get the border
Is it possible to index through an association with Sunspot? For example, if a
Is it possible to create an index that has as one of its columns
Is it possible to start an array at an index not zero...I.E. you have
In VB6 it is possible to prepand array identifiers with an empty array index.
Is it possible to configure or modify the NoseGAE plugin to automatically update index.yaml

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.