cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot directly insert into or update computed column

former_member513781
Discoverer
0 Kudos
217

Hello Experts,

Can someone explain impact of function based index on INSERT statement ?

Why below error coming while inserting data into table,

Error:

Cannot directly insert into or update computed column

Function based index on column of table :

Create Index userIndex1 on User (UPPER(user_name ))

I would appreciate all of your inputs and exact details.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

luc_vanderveurst
Participant

Hi,

Can you post the output of

select @@version

go

sp_help User

go

plus the insert query that gives the error?

Best Regards,

Luc.

former_member513781
Discoverer
0 Kudos

Please find output of above commands,

select @@version

Adaptive Server Enterprise/16.0 SP03 PL07/EBF 28771 SMP/P/AMD64/Windows 2008 R2 SP1/ase160sp03pl07x/0/64-bit/FBO/Wed May 22 02:15:10 2019

sp_help User -> Please find attachment.

Insert Data > Please find attachment.sp-help-user-insert-data.txt

luc_vanderveurst
Participant
0 Kudos

Hi,

I can't reproduce your problem.

I do have some remarks.

User is a rerserved word, I don't know what you did to make the server accept this as a tablename.

You use 'User' and 'user' as referring to the same table, so you must have a case insensitive sort order. If that's the case, I don't see the benefits of the functional index.

If you didn't execute the queries using the native isql command, then try that (to exclude that you use a tool that sets some options).

Best Regards,
Luc.