Author |
Message |
Stylestar
Kurra Bewarse Username: Stylestar
Post Number: 607 Registered: 01-2009 Posted From: 65.206.96.254
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, March 25, 2010 - 11:52 am: |
|
Ravanabrahma:SELECT * FROM testprimary a where a.shipto_flag != 'P' and a.billto_flag != 'P' and not exists (select 'x' from testprimary b where A.ACCOUNT = b.account and b.shipto_flag = 'P' OR B.BILLTO_FLAG = 'P')
first where lo a condition kuda akkaraledhu.. SELECT * FROM testprimary a where not exists (select 'x' from testprimary b where A.ACCOUNT = b.account and (b.shipto_flag = 'P' OR B.BILLTO_FLAG = 'P')) |
420
Celebrity Bewarse Username: 420
Post Number: 9782 Registered: 12-2006 Posted From: 212.159.240.81
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, March 25, 2010 - 7:34 am: |
|
25 ways using 1) NOT EXISTS 2) IN LINE VIEWS 3) Unions 4) ANTI JOINS ..
Knit India,do not split India !
|
Tingari_xx
Bewarse Legend Username: Tingari_xx
Post Number: 24642 Registered: 08-2006 Posted From: 76.109.130.86
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, March 25, 2010 - 7:23 am: |
|
bemmam mayya nee hourly billing ampaava leda i was NOT a bewarse, and then i saw Gosi post
|
420
Celebrity Bewarse Username: 420
Post Number: 9780 Registered: 12-2006 Posted From: 212.159.240.81
Rating: N/A Votes: 0 (Vote!) | Posted on Thursday, March 25, 2010 - 7:21 am: |
|
I have an another 25 ways of solving this .. Knit India,do not split India !
|
Onlymovies
Bewarse Legend Username: Onlymovies
Post Number: 11255 Registered: 01-2009 Posted From: 69.250.72.56
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:52 pm: |
|
Ravanabrahma:yaa..similar ee...:-) Omesh nuvvu koda similar gane raasav..work ayyindi..thanks to all. :-)
no probs yaa... ???
|
Ravanabrahma
Bewarse Legend Username: Ravanabrahma
Post Number: 12940 Registered: 06-2004 Posted From: 169.143.0.103
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:51 pm: |
|
Don:select * from table where ship_to != "P" OR bill_to != "P" and account != (select account from table where ship_to = "P" or bill_to = "P") ;
yaa..similar ee... Omesh nuvvu koda similar gane raasav..work ayyindi..thanks to all. |
Onlymovies
Bewarse Legend Username: Onlymovies
Post Number: 11253 Registered: 01-2009 Posted From: 69.250.72.56
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:48 pm: |
|
select * from table where ship_to not in ('P') and bill_to not in ('P') and account not in (select account from table where ship_to = 'P' or bill_to = 'P') idi try cheyyy ???
|
Don
Celebrity Bewarse Username: Don
Post Number: 8578 Registered: 12-2004 Posted From: 12.46.64.18
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:47 pm: |
|
kiki.. nenu almost close ga baagane raasanu anna maata select * from table where ship_to != "P" OR bill_to != "P" and account != (select account from table where ship_to = "P" or bill_to = "P") ; Insanity is the inability of the mind to adjust to reality!
|
Onlymovies
Bewarse Legend Username: Onlymovies
Post Number: 11252 Registered: 01-2009 Posted From: 69.250.72.56
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:47 pm: |
|
select * from table where ship_to not in ('P') and bill_to not in ('P') idi try cheyy baa... ???
|
Ravanabrahma
Bewarse Legend Username: Ravanabrahma
Post Number: 12939 Registered: 06-2004 Posted From: 169.143.0.103
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:45 pm: |
|
SELECT * FROM testprimary a where a.shipto_flag != 'P' and a.billto_flag != 'P' and not exists (select 'x' from testprimary b where A.ACCOUNT = b.account and b.shipto_flag = 'P' OR B.BILLTO_FLAG = 'P') ilaa raasanu..idi work ayyela undi mama. |
Ravanabrahma
Bewarse Legend Username: Ravanabrahma
Post Number: 12938 Registered: 06-2004 Posted From: 169.143.0.103
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:45 pm: |
|
SELECT * FROM testprimary a where a.shipto_flag != 'P' and a.billto_flag != 'P' and not exists (select 'x' from testprimary b where A.ACCOUNT = b.account and b.shipto_flag = 'P' OR B.BILLTO_FLAG = 'P') ilaa raasanu..idi work ayyela undi mama. |
Pda
Bewarse Legend Username: Pda
Post Number: 31957 Registered: 06-2006 Posted From: 74.110.17.126
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:44 pm: |
|
oracle ye bemmam maya.. with clause use chesa simple ga vuntadi ani Tough times never last but tough people do.
|
Ravanabrahma
Bewarse Legend Username: Ravanabrahma
Post Number: 12937 Registered: 06-2004 Posted From: 169.143.0.103
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:41 pm: |
|
ardam kaaledu pdaesh ee query..Oracle lonaa? mysql aa? |
Pda
Bewarse Legend Username: Pda
Post Number: 31956 Registered: 06-2006 Posted From: 74.110.17.126
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:40 pm: |
|
bemmam maya idi try pannu.. with filtered as (select a.acct "acct_no" from account a where a.ship = 'y' and a.bill = 'y') select b.acct,b.ship,b.bill from account b where b.acct in( select distinct acct_no from filtered) Tough times never last but tough people do.
|
Don
Celebrity Bewarse Username: Don
Post Number: 8577 Registered: 12-2004 Posted From: 12.46.64.18
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:33 pm: |
|
manaki SQL teleedu kaani.. oka raayi veyyamante vesta bemmam mams Insanity is the inability of the mind to adjust to reality!
|
Ravanabrahma
Bewarse Legend Username: Ravanabrahma
Post Number: 12936 Registered: 06-2004 Posted From: 169.143.0.103
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:27 pm: |
|
isthale cheppandehe.. |
Pda
Bewarse Legend Username: Pda
Post Number: 31955 Registered: 06-2006 Posted From: 74.110.17.126
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:25 pm: |
|
10$ aa nithonanda swamy.. dakshina adugutunnava.. oka ganta billing naku itte nenu chepthaa Tough times never last but tough people do.
|
Nitho
Celebrity Bewarse Username: Nitho
Post Number: 7906 Registered: 12-2004 Posted From: 69.136.252.78
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:21 pm: |
|
okka 10$ cost avvudhi , na acount ni transfer cheyyi..chebutha.. |
Ravanabrahma
Bewarse Legend Username: Ravanabrahma
Post Number: 12935 Registered: 06-2004 Posted From: 169.143.0.103
Rating: N/A Votes: 0 (Vote!) | Posted on Wednesday, March 24, 2010 - 6:08 pm: |
|
oka table lo rendu column values Y or P undochu. ee rendu columns lo edaina kaani value P unte inka aa account query lo raakodadu. aa account unna rows more than 1 undochu. example ila.. account ship_to bill_to 1 P Y 1 Y P 1 Y Y ipudu oka row lo P value ledu..kani same account ki paina edo oka row lo value P undi kabatti ee account raakodadu query lo..ela? ela... |