0 - 7 of 7 tags for union

I am new to Teredata and am having an issue with a union with two data sets with slightly different columns.  When I run the below SQL it comes back with a 3625 error for grouping with aggregage functions.  I know the error is caused by the addition of the i.item as ItemNum and the i.MODEL_NO as ModNum but I am not guite sure how to resolve it.  My first

I have a query with a UNION.  I was trying to combine 2 records into 1.  The top half gets records from 1 set of tables and the bottom half gets records from a differen set of tables.  Both halves use fields from 2 derived queries.  The results currently look like this:

Hi,
I have below query which is failing in dev environment due to spool issue:
 
INSERT INTO D0_IM_RSTG_TAS_MD4.STG_TEMP_STOCK_DETAILS(MATERIAL_ID,
VALUATION_AREA_ID, PLANT_ID, STORAGE_LOCATION_ID, CUSTOMER_ID,
VENDOR_ID, WBS_ELEMENT_ID, FISCAL_PERIOD_CODE, BEGIN_DATE, END_DATE,

Hi everyone, 
Sorry for my English. I´m not good writer.
 
Well, I made a Union

SELECT  CUSTOMER_REF_NAM as CustRef FROM SaleOrder;

 

Union 

 

SELECT CUSTOMER_REF_NAM as CustRef FROM AL1;

 

Greetings Experts,
 
Can you please explain the following
The “union” command can be used to break up a large sql process or statement into several smaller sql processes or statements, which would run in parallel. But these could then cause spoolspace limit problems. “Union all” executes the sql’s single threaded
 

Hi,

I have a quesion.

In case of huge data volume which one from below wil be better?

 

Insert into A

(

aa,bb,cc

)

sel

aa,bb,cc

from B

I am trying to find out how to get the bounding box of several geometries in teradata. I am currently working with 13.00 and have tried the following:

select SYSSPATIAL.AggGeomUnion(cast(geom.ST_Envelope() as VARBYTE(64000))) from road;
select SYSSPATIAL.AggGeomUnion(geom.ST_Envelope()) from road;

both of these statements return a byte array which is not wkb. The docs says it is a varbyte and can be cast to an ST_Geometry which I tried with the following statment:

select cast(SYSSPATIAL.AggGeomUnion(cast(geom.ST_Envelope() as VARBYTE(64000))) as ST_GEOMETRY) from road;