I have 2 different database roles. Let's call them "Role A" and "Role B".
I have the following query:
with part_1 as (
select col_1
from table
where id <= 100
)
select p1.col_1
from part_1 as p1;
Using "Role A", the entire query fails, but not the inside of the CTE is I just highlight that and run it.
If I switch to "Role B", I have no problems whatsoever doing this.
Any suggestions or advice? I don't understand how 2 different roles can can produce different results.