postgresql error st_point

1602
2
Jump to solution
09-12-2019 10:08 AM
SanhitaChatterjee2
New Contributor II

I am doing a union of multiple tables to create a view. All table include shape and have the same geometry type. I am getting the following errors while creating the spatial view: ERROR: could not identify an equality operator for type st_point LINE 8: td.shape . What am I not defining in shape in either tables that is causing the error?

A sample of my query for the view is as follows:

SELECT
td.storenum,
td.address,
td.city,
td.state,
td.zip,
td.shape
FROM
competitor_td td

where td.catcode= '05'

union

select
vw.store_num as storenum,
vw.address,
vw.city,
vw.st_abbrv as state,
vw.zip_code as zip,
vw.shape
FROM
store_vw vw
WHERE  vw.status <> 'Closed'

0 Kudos
1 Solution

Accepted Solutions
George_Thompson
Esri Frequent Contributor

I am not an expert, but you may have the incorrect syntax; ST_Union & PostgreSQL: Documentation: 11: 7.4. Combining Queries 

--- George T.

View solution in original post

2 Replies
George_Thompson
Esri Frequent Contributor

I am not an expert, but you may have the incorrect syntax; ST_Union & PostgreSQL: Documentation: 11: 7.4. Combining Queries 

--- George T.
SanhitaChatterjee2
New Contributor II

Thanks. Simple fix- changed to union all and it worked. 

0 Kudos