>>Add FROM T1 for last tests. Personal Oracle Database 10g Release 10.2.0.3.0 CREATE temp TABLE t1(a INTEGER, b INTEGER); INSERT INTO t1 VALUES(1,2); INSERT INTO t1 VALUES(9,8);
SELECT a AS b, b AS a FROM t1 ORDER BY a; B A ---------------------- ---------------------- 1 2 9 8 2 rows selected SELECT b AS a, a AS b FROM t1 ORDER BY a; A B ---------------------- ---------------------- 2 1 8 9 2 rows selected SELECT a, b AS a FROM t1 ORDER BY a; SQL Error: ORA-00960: ambiguous column naming in select list 00960. 00000 - "ambiguous column naming in select list" *Cause: A column name in the order-by list matches more than one select list columns. SELECT a AS b, b AS a FROM t1 WHERE a=1; B A ---------------------- ---------------------- 1 2 1 rows selected SELECT a AS b, b AS a from t1 WHERE a=2; B A ---------------------- ---------------------- 0 rows selected SELECT a AS x, b AS x from t1 WHERE x=1 SQL Error: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_X' >>IRELEVANT SELECT a AS Par, b AS Par from t1 WHERE Par=1; SQL Error: ORA-00904: "PAR": invalid identifier _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users