Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23331 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 | Posted on Wednesday, July 10, 2013 - 10:01 pm: | |
I have the below query. select vendor_name, address_line1, vendor_id from table a, b where .. Union select vendor_name, null as address_line1, vendor_id from table x, y where .. Now I am getting the data like Dell, 236 springcreek, 123 Dell, null, 123 If the result of the union query has multiple rows with the same vendor_id but one with null addressline, I don't want to get that record that has null addressline, if the query return only the null addressline record, then I want to display that. How can I acheive this? |