Topics Topics Help/Instructions Help Edit Profile Profile Member List Register Paatha Gnyapakaalu - Archives from Old DB  
Search New Posts 1 | 2 | 8 Hours Search New Posts 1 | 3 | 7 Days Search Search Tree View Tree View Latest tweets Live Tweets   Hide Images
Bewarse Talk Discussion Board * Archives - 2013 * Cine Talk - Reviews, Gossips, Insider Info etc. * Archive through July 17, 2013 * SQL Query Help < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this 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:    Edit Post Delete Post Print Post


Ravanabrahma:




Cool MOVIEART--feel
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post


Symbol_of_king:




bhayya kummesav..query working :-) kummesav assala...
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post


Symbol_of_king:




Thanks bhayya..aagu try chestha idi.
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post

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 :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post


Ferrari:

pls post the answer after 30 mins bemmam maayyaa




MOVIEART--bemmi.uhoh ade try chesthanna ela cheyyalaa ani...
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post


Ravanabrahma:

How can I acheive this?


pls post the answer after 30 mins bemmam maayyaaMOVIEART--bemmi.aggipulla
Nandamuri Taraka Rama Rao - Sachin Ramesh Tendulkar
Top of pagePrevious messageNext messageBottom of page Link to this message

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:    Edit Post Delete Post Print Post

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?

Topics | Last Hour | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration