prabhu kumar SV
prabhu kumar SV

Reputation: 11

5702 : The SQL Server is terminating this process because the database view

after modifying the view as below, if use the view in the select statements by the application(as below query), then we are getting

DB error 5702: The SQL Server is terminating this process.

Here's the query

select *
from view1 v1,
view2 v2
where v1.column in(select M_FLOW_ID from VW_NETPAY_UNDO)

is the issue because more number of view in sql statements ?

Upvotes: 1

Views: 692

Answers (1)

Enrique Benito Casado
Enrique Benito Casado

Reputation: 2080

Most provably is that your query is runing for a long long time and sybase decided to stop the process, root of the problem ist that you have a cross join between the 2 Views. You should match the 2 views,(on View1.columnA= View2.columnA)

    select *
     from view1 v1,
     view2 v2 on V1.id = V2.id  -- id like common value column
      where v1.column in(select colum1 from table1)

.If you don´t do that you have a cartesian products between the 2 Views and then the resuld wouldnt arrise.

Best Regards, Enrique

Upvotes: 1

Related Questions