Postgres query into Omnis question
Mayada Al-Kishtini
malkishtini at gmail.com
Tue Mar 28 16:10:25 EDT 2017
Hi Steve,
Try
select order_number, order_comments:: varchar(2000)
from order_forecast
UNION
select order_number, null as order_comments :: varchar(2000) from orders
Mayada
-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Steve Finger
Sent: Tuesday, March 28, 2017 3:52 PM
To: OmnisDev - English
Subject: Postgres query into Omnis question
Hi,
I’m using Studio 6.1.3 to do a query to Postgres. To simplify, here is an example of what I’m trying to do:
select order_number, order_comments
from order_forecast
UNION
select order_number, null as order_comments from orders
Then I fetch the result into an undefined Omnis list. Currently only the orders table has values.
The problem is what Omnis brings back into the list. The order_comments column doesn’t have a length. So in an Omnis window which has a complex grid to display and enter values into the order_comments field, nothing can be typed in.
If I change null to ‘ ‘ (1 space) in the query then the column is defined with a length of 1.
The database table is set to 2000 characters.
How can I modify the query so Omnis knows that the length of the column that is returned from the query should allow 2000 characters? Or am I going to have to redefine the list in Omnis?
Thanks,
Steve Finger
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list