Author |
Message |
Hemanth
Bewarse ke Bewarse! Username: Hemanth
Post Number: 15188 Registered: 03-2004 Posted From: 65.196.167.82
| Posted on Thursday, April 27, 2006 - 9:22 am: | |
expense_number not in anesi raasesa. pani sesindi. kiki. |
Hemanth
Bewarse ke Bewarse! Username: Hemanth
Post Number: 15187 Registered: 03-2004 Posted From: 65.196.167.82
| Posted on Thursday, April 27, 2006 - 9:21 am: | |
yeh, ayipoyindi, nenu inka expense numbers gatra vaadala, creation date koda, batch no 1 fine ade ee roju pampindi, except that antha bagane undi. ninna maa collegue gadiki vanuku vachindi. matter senior vice president daggaraki vellindi. emaindo motham cheppamani phone chesadu. kiki. nenu 6 bank ki cut off ayithe last file 5:56 ki pampa. kiki. final ga matter antha set ayyindi. thanks gochi and bomma lu. |
Bommarillu
Pilla Bewarse Username: Bommarillu
Post Number: 277 Registered: 07-2005 Posted From: 12.41.255.10
| Posted on Thursday, April 27, 2006 - 9:14 am: | |
yep it's the same. What i wrote is a refined form of a query. |
Gochi
Bewarse ke Bewarse! Username: Gochi
Post Number: 19538 Registered: 07-2004 Posted From: 162.136.192.1
| Posted on Thursday, April 27, 2006 - 8:56 am: | |
bomma gaaru baaga raasaru query..kaani manam ittanti joinslo saana weak.. D left join H on d.batchid = h.batchid And d.expenseNo = h.expenseNo ante enti...is it same as d.batchid = h.batchid(+) And d.expenseNo = h.expenseNo(+) |
Bommarillu
Pilla Bewarse Username: Bommarillu
Post Number: 276 Registered: 07-2005 Posted From: 12.41.255.10
| Posted on Thursday, April 27, 2006 - 8:51 am: | |
DE: okelaga unnayi kani my query is faster performance wise than gochi's. |
Donga_evaru
Bewarse ke Bewarse! Username: Donga_evaru
Post Number: 15870 Registered: 08-2004 Posted From: 134.130.20.127
| Posted on Thursday, April 27, 2006 - 8:32 am: | |
idharu cheppinavi okaelaga vunnayi kadha.. |
Diamondweapon1
Pilla Bewarse Username: Diamondweapon1
Post Number: 8 Registered: 04-2006 Posted From: 12.35.237.21
| Posted on Thursday, April 27, 2006 - 8:32 am: | |
mee iddari debbaki chinna queries marchipothadu |
Bommarillu
Pilla Bewarse Username: Bommarillu
Post Number: 275 Registered: 07-2005 Posted From: 12.41.255.10
| Posted on Thursday, April 27, 2006 - 8:18 am: | |
I think what gochi said migh work but this will definetly give you the extra rows Select d.* from Details d left join Header h On d.batchid = h.batchid And d.expenseNo = h.expenseNo Where h.batchid is null and d.batchid = 1 Replace the select with delete. Its a simple left join. |
Gochi
Bewarse ke Bewarse! Username: Gochi
Post Number: 19522 Registered: 07-2004 Posted From: 162.136.192.1
| Posted on Thursday, April 27, 2006 - 8:14 am: | |
itta raasthey aa extra rows anni vasthaayemo maama..try cheyyi.. select * from DETAILS where batch_id = 1 and not exists in (select * from HEADERS H, DETAILS D where H.batch_id = D.Batch_id and H.expense_number = D.expense_number and H.creation_date = D.creation_date) |
Gochi
Bewarse ke Bewarse! Username: Gochi
Post Number: 19521 Registered: 07-2004 Posted From: 162.136.192.1
| Posted on Thursday, April 27, 2006 - 8:08 am: | |
poddunne SQL doubt aduguthaava... |
Bommarillu
Pilla Bewarse Username: Bommarillu
Post Number: 274 Registered: 07-2005 Posted From: 12.41.255.10
| Posted on Thursday, April 27, 2006 - 7:49 am: | |
do you still want the solution for this or did you already figure it out? Because if you do need it, I can write the solution query here. |
Hemanth
Bewarse ke Bewarse! Username: Hemanth
Post Number: 15182 Registered: 03-2004 Posted From: 65.196.167.82
| Posted on Wednesday, April 26, 2006 - 10:23 am: | |
idantha rasepatiki naake idea vachela undi. kikiki. aagandi try setha. |
Hemanth
Bewarse ke Bewarse! Username: Hemanth
Post Number: 15181 Registered: 03-2004 Posted From: 65.196.167.82
| Posted on Wednesday, April 26, 2006 - 10:22 am: | |
mamalu, naa daggara 2 tables unnayi.headers and details. ippuudu emaindante details table lo konni records extra vachayi. columns vachi 1. Batch id 2. expense number 3. creation_date rendu tables lo details table lo rows delete cheyyali evi ante ninna load chesinavi, kaani konni rows unchali, avi correct vee. ippudu 1st table ki relation entante sample data. headers 1. batch_id 2. expense_number 3. creation_data 230 1234 2/3/2005 1 12345 04/25/2006 details. 1. batch_id 2. expense_number 3. creation_data 230 1234 2/3/2005 1 12345 04/25/2006 1 1234 2/3/2005 ippudu nenu cheyyalsindi entante batch id 1 unna anni rows delete cheyyali from details table except the rows that are there in the headers table with the batch id 1. |