Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi all, every time that we run this SQL we get the assertion error. We validate, rebuilt DB, recreate statistics, recreate the indexes and unload/load the data without success, the issue still appears.

Something interesting, the issue only happens starting the DB as network server if you start it as personal server the SQL works.

If we play with the 'status_cd' column values (<3 or <2), it works (but need <4). Seems like there is a conflict with the scan predicate of the values in the 'status_cd' column.

Have you seen this error before or some clue what I could do to solve this problem.?

Error: There was an error reading the results of the SQL statement. The displayed results may be incorrect or incomplete. Run time SQL error -- ERROR Assertion failed: 111105 (17.0.10.5820)[db######] Sort error - incorrect row count SQLCODE=-300, ODBC 3 State="HY00" Line 1, column 1

SQL statement:

SELECT count(distinct c.stu_id ) as cnt FROM sr_ord c Inner Join cr_orf b On c.orf_id = b.orf_id Inner Join dr_orf_grp_dtl gd On b.orf_id = gd.orf_id Inner Join dr_orf_grp g On gd.orf_grp_id = g.ORF_GRP_ID and g.GRP_TYPE_ID in (1,3) JOIN dr_ord_opt d on c.ord_opt_id = d.ord_opt_id JOIN SR_ORF_VIEW e on c.ORF_ID = e.orf_id and c.stu_id = e.stu_id and e.date_acpt >= c.DTS WHERE ( (d.is_key <> 1 AND c.rvwed_reslts = 0 AND c.rvwed_by NOT IN ('TCC-AUTO'))OR ( d.is_key = 1 AND c.data_operation = 2 AND c.rvwed_reslts = 0 AND c.rvwed_by NOT IN ('TCC-AUTO'))) AND c.stu_id in (SELECT x.stu_id FROM sr_stu_enroll x WHERE x.status_cd < '4' AND x.active_cd = '1' AND x.campus_id = '101' AND x.sch_yr = '2020')

Thanks

asked 23 Aug '19, 16:22

lferreira's gravatar image

lferreira
1017711
accept rate: 0%

1

Is a database that you can share with SAP for investigation? If so, are you able to open an incident?

(23 Aug '19, 16:46) Chris Keating

Yes, I already opened an incident and I think we found the problem, something with the parallelism, we limited max_query_tasks to 4 and the query worked.

(26 Aug '19, 09:13) lferreira
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×48
×29

question asked: 23 Aug '19, 16:22

question was seen: 1,472 times

last updated: 26 Aug '19, 09:13