Does anyone know why I am unable to make this a persisted column?
create table test (
a varchar(500),
b as (case(left([a], 4)) when 'Test' then 1 else 0 end)
)
After created I go into SSMS and am unable to modify 'IsPersisted' column
from NO to YES"paul" <paul@.discussions.microsoft.com> wrote in message
news:23A62435-6274-4341-A100-0210B0520A7F@.microsoft.com...
> Does anyone know why I am unable to make this a persisted column?
> create table test (
> a varchar(500),
> b as (case(left([a], 4)) when 'Test' then 1 else 0 end)
> )
> After created I go into SSMS and am unable to modify 'IsPersisted' column
> from NO to YES
create table test
(
a varchar(500),
b as (case(left([a], 4)) when 'Test' then 1 else 0 end) persisted
)
David|||Thanks David. When I ran this it didn't work. Then I realized the database
I was running it on was sql2000 version. Once I tried it on sql2005, worked
like a charm.
"David Browne" wrote:
> "paul" <paul@.discussions.microsoft.com> wrote in message
> news:23A62435-6274-4341-A100-0210B0520A7F@.microsoft.com...
> create table test
> (
> a varchar(500),
> b as (case(left([a], 4)) when 'Test' then 1 else 0 end) persisted
> )
> David
>
>
No comments:
Post a Comment