Author |
Message |
Symbol_of_king
Kurra Bewarse Username: Symbol_of_king
Post Number: 2120 Registered: 12-2005 Posted From: 72.209.237.32
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, July 11, 2013 - 1:37 am: |
|
Ravanabrahma:
Cool |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23334 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, July 11, 2013 - 12:19 am: |
|
Symbol_of_king:
bhayya kummesav..query working kummesav assala... |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23333 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, July 11, 2013 - 12:12 am: |
|
Symbol_of_king:
Thanks bhayya..aagu try chestha idi. |
Symbol_of_king
Kurra Bewarse Username: Symbol_of_king
Post Number: 2119 Registered: 12-2005 Posted From: 72.209.237.32
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 10, 2013 - 11:15 pm: |
|
with T1 as ( select vendor_name, address_line1, vendor_id from table a, b where .. Union select vendor_name, address_line1, vendor_id from table x, y where .. ) select vendor_name,address_line1,T1.vendor_id from T1, (select count(*) cnt,vendor_id from T1 where address_line1 is not null group by vendor_id) T2 where T1.vendor_id=T2.vendor_id(+) and (T1.address_line1 is not null or (T2.cnt=0 and T1.address_line1 is null)); --I dont know if it is right or wrong... just tried to answer it |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23332 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 10, 2013 - 10:09 pm: |
|
Ferrari:pls post the answer after 30 mins bemmam maayyaa
ade try chesthanna ela cheyyalaa ani... |
Ferrari
Yavvanam Kaatesina Bewarse Username: Ferrari
Post Number: 9843 Registered: 09-2010 Posted From: 50.148.237.92
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, July 10, 2013 - 10:07 pm: |
|
Ravanabrahma:How can I acheive this?
pls post the answer after 30 mins bemmam maayyaa Nandamuri Taraka Rama Rao - Sachin Ramesh Tendulkar
|
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 23331 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | 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? |