1

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 ?

Alfabravo
  • 7,493
  • 6
  • 46
  • 82

1 Answers1

1

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

Enrique Benito Casado
  • 1,914
  • 1
  • 20
  • 40