From the case you gave, the “variable” seems a view ? Sorry I’m not familiar with the traditional RDBMS.
Best, Danny Chan 在 2020年2月17日 +0800 PM1:27,Christian Beikov <christian.bei...@gmail.com>,写道: > Hello, > > I asked this before but I guess the question got too big, so I thought > splitting it up might be better. > > I am trying to generate a query from a relational model on which I did a > few tranformations but I don't know how to refer to a "variable". > > In a SQL trigger, there usually are two variable "OLD" and "NEW" which I > want to be able to refer to. I tried introducing a "transient scan", but > unfortunately that won't work because this is not a relation and can't > be quoted. I will workaround this for now by introducing a temporary > relation in the trigger so that I can refer to it, but ideally I want to > refer to the variable directly. > > The simplest example SQL that I want to be able to produce would look > like this: > > select NEW."some_column" > > The tricky part here is that NEW is not quoted. I don't know how I can > represent this in a relation expression. > > Thanks in advance for any help! > > Regards, > > Christian >