Posted by: Raj
I am trying to download a query which contains UNION clause and one of the
field( co.comments) is defined 'LongVarchar' in the table.
select charge_project_no, measure_name, null from purchase_order po,
select charge_project_no, measure_name, co.comments from po_change_order
co, purchase_order po
select b.subproject_no, b.measure_name, null from project_budget b, project
I get a error mismatch in datatypes when I run the query. Can someone help
me fix this query. Highly appreciated.
- Posts: 114
- Joined: 10 Apr 2017, 18:45
- Location: Ushuaia, Argentina
Posted by: Enrique Martinenco
Try put the sentence with the longvarchar as the first select in the Union.
Also may try put '' instead Null in the rest of selects.
Posted by: Aravind Ram
You cannot do a union with a long varchar column. This will be the same as
trying to do a distinct on the long varchar column. You will have to either
use union all (which will not eliminate the duplicates) or select the long
varchar column separately.
Posted by: Karthik
Who is online
Users browsing this forum: [Ccbot] and 0 guests