Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 The SQL State 42000 Error1934 in Inserting

Author  Topic 

ll_sean
Starting Member

1 Post

Posted - 2013-10-24 : 21:49:17
When I excute the below scripts as a scheduled job step, I get this error:
'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. [SQLSTATE 42000] (Error 1934). The step failed.
Here is my Script,I'm confused that it is normal When I just excute it as a query:
insert into cas_visit_report2(subject,P_ID)
select
a.subject,b.participate
from
(select subject,participate=convert(xml,' <root> <v>'+replace(participate,';',' </v> <v>')+' </v> </root>') from cas_visit_report)a
outer apply
(select participate=C.v.value('.','nvarchar(100)') from a.participate.nodes('/root/v')C(v))b

Thank you all
   

- Advertisement -