![]() Columns that do not match by name are excluded from the result table, except for the OUTER UNION operator. CORR causes PROC SQL to match the columns in table expressions by name and not by ordinal position. The CORRESPONDING keyword is used only when a set operator is specified. SAS SQL has specific operator to handle that scenario: ![]() Normally you need to have the same number of columns when you're using set based operators so Kangkan's answer is correct. OR if the above does not solve your problem, how about creating an ALIAS in the columns like this: (the query is not the same as yours but the point here is how to add alias in the column.) SELECT id_table_a, Select col_a, col_c, col_b from test2_1790 Select col_a, col_b, col_c from test2_1790 Ī more frequent scenario for this error is when you inadvertently swap (or shift) two or more columns in the SELECT list: select col_a, col_b, col_c from test1_1790 Select col_a, col_b, col_c from test1_1790 This type of errors can be easily avoided by entering the column list explicitly: ORA-01790: expression must have same datatype as corresponding expressionĪs you see the root cause of the error is in the mismatching column ordering that is implied by the use of * as column list specifier. this example below produces an error: create table test1_1790 ( The below description from another answer will come handy.Īre the results above the same as the sequence of columns in your table? because oracle is strict in column orders. ![]() But mismatch in the Order of data type caused an error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |