Need help in defining Null vlaues to a cloumn in SQL developer
Hi All,
I have view in SQL which is union of 2 tables...sales and orders.
to define view...we hould have same no. of column in both the tables..due to their functionality difference..there are certain columns of orders table which are not in sales..so I defined them in sales union and replaced it with null..as we do not want any data for these columns..here comes the problem during execution..
null ordertype from sales;+ ..this works perfectly when I run the sales piece separately..but when i use union and use it..it doesn't give any result...this is because..
null ordertype from sales;* is assgning data type of varchar2(0) to the column ordertype..
so i tried..
null orders.ordertype
from sales,orders ------ gives error
orders.ordertype from
sales,orders ------data type of the column is retained, but i cannot assign null values to the column
can you suggest me a way where I can retain the data type of the column name as well as set values of that column to null..
Thanks in advance..