ghazni Posted October 16, 2012 Report Posted October 16, 2012 guys i have datawarehouse database where there is only primary key and no foreign keys. I have a condition from one table and based on that condition i have to delete the records from other tables. i have to delete all records on that condition from that table and also the records from other tables on the same condition.
Josh Posted October 16, 2012 Report Posted October 16, 2012 Nuvu delete cheyalsina tables lo common columns unnaya ?
chelsea Posted October 16, 2012 Report Posted October 16, 2012 [quote name='ghazni' timestamp='1350422181' post='1302639236'] guys i have datawarehouse database where there is only primary key and no foreign keys. I have a condition from one table and based on that condition i have to delete the records from other tables. i have to delete all records on that condition from that table and also the records from other tables on the same condition. [/quote] common columns vunte join use chesi where condition use chesi delete cheyyi first try delete all the records from other tables than main table lo delete cheyyi
ghazni Posted October 16, 2012 Author Report Posted October 16, 2012 [quote name='Josh' timestamp='1350422612' post='1302639345'] Nuvu delete cheyalsina tables lo common columns unnaya ? [/quote] [quote name='chelsea' timestamp='1350422873' post='1302639389'] common columns vunte join use chesi where condition use chesi delete cheyyi first try delete all the records from other tables than main table lo delete cheyyi [/quote] common columns use chesi join chesanu and delete chestey only okatey table delete ayayi.......... adi kuda first table i.e from use chesina table migata tables delete avaledu...........
cherlapalli_jailer Posted October 16, 2012 Report Posted October 16, 2012 paste sample SQL we can help to debug
ghazni Posted October 16, 2012 Author Report Posted October 16, 2012 [size=2][color=#000000][color=#0000ff][size=2][color=#0000ff][size=2][color=#0000ff][color=#0000ff][color="#222222"]edited[/color][/color][/color][/size][/color][/size][/color][/color][/size]
ghazni Posted October 16, 2012 Author Report Posted October 16, 2012 nenu motam alaney peta delete chestanu intiki vachaka............ so if anybody knows help me.........
ghazni Posted October 16, 2012 Author Report Posted October 16, 2012 [quote name='cherlapalli_jailer' timestamp='1350423434' post='1302639433'] paste sample SQL we can help to debug [/quote] pm chesa chudu mama...............
cherlapalli_jailer Posted October 16, 2012 Report Posted October 16, 2012 delete from one tab Ee kada rest r conditions so obvious ga oka tbl niche delete avuthayi
cherlapalli_jailer Posted October 16, 2012 Report Posted October 16, 2012 delete from tbla,tblb, tblc Where [i]now eniter condition then it will delete from 3 tbls[/i] [i]is what i found[/i]
mtkr Posted October 16, 2012 Report Posted October 16, 2012 ya mama as jailer saab mentioned aa delete stmt lo anni tbls mention cheii.... delete HD ani okkate tbl pettinavvv... chk tht once...
deals2buy Posted October 16, 2012 Report Posted October 16, 2012 [quote name='chelsea' timestamp='1350422873' post='1302639389'] common columns vunte join use chesi where condition use chesi delete cheyyi first try delete all the records from other tables than main table lo delete cheyyi [/quote] ala ela delete chestava vaa? nuvvu maree comedy kakapothe
cherlapalli_jailer Posted October 16, 2012 Report Posted October 16, 2012 @Ghazani did u get clue or do u need further info So that i will provide sample example ....for further info
mtkr Posted October 16, 2012 Report Posted October 16, 2012 [quote name='deals2buy' timestamp='1350425231' post='1302639608'] ala ela delete chestava vaa? nuvvu maree comedy kakapothe [/quote] enduku cheyyodhu mama!!! foreign key unte alane cheyyali gaaa... frst child tbl thn parent tbl (assuming chelsea mama thnkg thrz FK)
Recommended Posts