ORDER BY Not allowed in Sub-Queries in Teradata
Teradata Error |
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.
Comments
Post a Comment