Friday, 13 February 2015

ORDER BY Not allowed in Sub-Queries in Teradata

Teradata Error
Teradata Error
I am executing a query

INSERT INTO SAMPLES.CUST_NAMES;
SELECT A.NAME FROM SAMPLES.CUSTOMERS INNER JOIN
SAMPLES.ORDERS
ON A.CUST_CODE = B.CUST_CODE
WHERE B.ORDER_QTY BETWEEN 200 AND 300
ORDER BY A.NAME DESC;

The error is ORDER BY is not allowed.

Here, we are just inserting so ORDER BY is not required. It is useless.


No comments:

Post a Comment

Featured post

5 Top Teradata DATE functions to read now

The following are the list of DATE functions. These are very frequently being used in Teradata. The following statement requests the cur...

Popular Posts