Re: Newbie question about casting literals - oracle/postgres

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Newbie question about casting literals - oracle/postgres
Дата
Msg-id 417F0DB0.2020000@commandprompt.com
обсуждение исходный текст
Ответ на Newbie question about casting literals - oracle/postgres  ("Naeem Bari" <naeem.bari@agilissystems.com>)
Список pgsql-general

The only way this works in postgres is by casting ‘GREEN’ to text using ‘GREEN’::text

 

The problem is then this does not work with oracle. Since my software has to support both databases, I am left in a bit of a bind. Any ideas on how to make postgres accept ‘GREEN’ as text without my having to spell it out by casting?

You could create separate views for both. That means you would have to keep seperate views for each database but the SQL in your code would be the same.

Sincerely,

Joshua D. Drake



 

Thanks!

naeem



-- 
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

В списке pgsql-general по дате отправления:

Предыдущее
От: "mayra"
Дата:
Сообщение: Theory
Следующее
От: Robby Russell
Дата:
Сообщение: Re: primary key and existing unique fields