Database view giving error: Syntax Error or Access Rule Violation detected by database ((conn=395195) Unknown column 'cod.a_str_22' in 'on clause')

TT3
Kilo Guru

I am trying to create a database view. After specifying all the details, when I click on Try It link, I am getting below error.

Syntax Error or Access Rule Violation detected by database ((conn=395195) Unknown column 'cod.a_str_22' in 'on clause')

I have checked:

  • There is no column named a_str_22 in the table which aliases cod.
  • None of the where clause refers to a_str_22 column for table which aliases cod.
  • The table which aliases cod, does not have any access restriction. I was able to create another view in the same scope.

Am I missing anything?

Note: Relevant answers/comment will be marked appropriately.

1 ACCEPTED SOLUTION

TT3
Kilo Guru

The fix was to update "order" column. So the table that is primary and have no dependency then it should be 100 and subsequent can be 200 and so on.

Thank you.

View solution in original post

11 REPLIES 11

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

Hi,

Can you show the Database view and all the details you set up?

Here is the setup. Thank you.

find_real_file.png

Miguel Donayre
ServiceNow Employee
ServiceNow Employee

In the 3rd entry, the "cod_u_csad_sku ='MSB-MRC' is that a reference field on the table? 

nope, it is just a text/string field.