Clash of the Backends leaves Developer stunned
On Fri, Feb 2, 2018 at 5:11 PM, Das Goravani <firstname.lastname@example.org> wrote:
> So I’ve heard from a number of Omnis/SQL Gurus on the subject of “Generic
> SQL” and Backends.
> One told me to stick to the Standard SQL as much as possible for
> portability. Other amongst the knowing tell me that there are multiple
> standards and besides the backends give differing results for the same
> commands, and that trying to handle multiple backends is a pain.
> So my very general question is this: Should one tell oneself that they
> are trying to stick to the standard? Should one try at all?
> I just had the case where I need to “cast” my numeric field to text so
> that I can do a LIKE comparison in a Where Clause. I was given two ways of
> casting… one is to write cast() in front of the column name in question,
> and the other is Postgres’s way where you say name::text to cast it to
> text. I’m using a Postgres server as I develop, and it does not recognize
> the first method, only it’s own method.
The example I shared with you works on PostgreSQL. You should get
comfortable with using the PSQL shell, whether in Terminal or in PGadmin to
make sure that the issue isn’t on the Omnis side and only once you have
gotten it working there, figure out how to implement that in Omnis.