SQL Query help   Independent houses near kukatpally | Apartments in Pragathi Nagar | AndhraVaani.com | Log Out | Topics | Search
Register | Edit Profile

Bewarse Talk � Archives � Cine Talk - Reviews, Gossips, Insider Info etc. � Archive through February 11, 2006 � SQL Query help � Previous Next �

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 427
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 5:02 pm:   Edit PostDelete PostView Post/Check IP

U r most elcome hemu mama
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12578
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 4:51 pm:   Edit PostDelete PostView Post/Check IP

chala chala thanks mama. repu anni prints thestha. edo exam laga quiz laga undi last di, anni sadivaka adi sethanu. neeku boldantha thanks mama. :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Petrol_bunk
Bewarse
Username: Petrol_bunk

Post Number: 1674
Registered: 06-2005
Posted From: 67.161.28.221
Posted on Monday, January 30, 2006 - 4:46 pm:   Edit PostDelete PostView Post/Check IP

Batasari real nick Same letter to start ayyi ade letter to end avutundi, prati daniki tega hadavidi chesuntadu

appudappudu KIKIKI navvu tontuntadu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 426
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 4:41 pm:   Edit PostDelete PostView Post/Check IP

here is another simple one
http://www.w3schools.com/sql/default.asp
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12577
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 4:40 pm:   Edit PostDelete PostView Post/Check IP

Thanks mama, anni book mark chesanu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 425
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 4:24 pm:   Edit PostDelete PostView Post/Check IP

>>
BATSARI ANTE CHINNA PILLODU KOODA CHEPUTADU. OKKA HEMANTH TAPPITE ENDUKO CHEPPUKO
<<

ndukalaaga....I want to know right now...(aka bemmam davilogue in anaganaga okaroju)
tell me fast tell me fast I say..kiki....


hemu mama here goes URL's

http://www.intermedia.net/support/sql/sqltut.asp

http://sqlzoo.net/

here U can see left hand side many links whis is dedicated to respective clause of SQL
http://sqlcourse2.com/
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12576
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 3:55 pm:   Edit PostDelete PostView Post/Check IP

Top of pagePrevious messageNext messageBottom of page Link to this message

Petrol_bunk
Bewarse
Username: Petrol_bunk

Post Number: 1673
Registered: 06-2005
Posted From: 209.172.81.132
Posted on Monday, January 30, 2006 - 3:55 pm:   Edit PostDelete PostView Post/Check IP

<<< BTW batasari ante okka_magadu mama naa??

Nuvvu Mari chilipi and comedy king vi Hemu gaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12575
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 3:52 pm:   Edit PostDelete PostView Post/Check IP

okkamogaadu mama, aa site names cheppu mama, naaku aa joins avanni kavali mama.

bunk mama, chostha aagu. BTW batasari ante okka_magadu mama naa??
Top of pagePrevious messageNext messageBottom of page Link to this message

Petrol_bunk
Bewarse
Username: Petrol_bunk

Post Number: 1672
Registered: 06-2005
Posted From: 209.172.81.29
Posted on Monday, January 30, 2006 - 3:50 pm:   Edit PostDelete PostView Post/Check IP

OM mama
BATSARI ANTE CHINNA PILLODU KOODA CHEPUTADU. OKKA HEMANTH TAPPITE ENDUKO CHEPPUKO
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 424
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 3:48 pm:   Edit PostDelete PostView Post/Check IP

petrol mama

U mean okka_magaadu= baatasaari na...
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Petrol_bunk
Bewarse
Username: Petrol_bunk

Post Number: 1671
Registered: 06-2005
Posted From: 209.172.81.29
Posted on Monday, January 30, 2006 - 3:45 pm:   Edit PostDelete PostView Post/Check IP

Sorry Ignore my previous post

select E1.ID from Emp E1
Where E1.Status in ('A','T')
group by e1.id
having count(distinct e1.status)=2
Top of pagePrevious messageNext messageBottom of page Link to this message

Petrol_bunk
Bewarse
Username: Petrol_bunk

Post Number: 1670
Registered: 06-2005
Posted From: 209.172.81.29
Posted on Monday, January 30, 2006 - 3:44 pm:   Edit PostDelete PostView Post/Check IP

select E1.ID from Emp E1
Where E1.Status in ('A','T')
group by e1.id
having count(*)=2

idi chalemo Batasari gaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 423
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 3:43 pm:   Edit PostDelete PostView Post/Check IP

there are many sites avaialble to learn SQL starts teaching from basics too highlevel...

and even codd's rules, data modeling using normalization and de-normalaization...

if U got enough time and interest then I suggest U make use of those sites

finally U turn out to be a GEM in SQL or U can feel as in GEM in RDBMS...
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 422
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 3:41 pm:   Edit PostDelete PostView Post/Check IP

ledu gochi mama

its CODD who started RDBMS era earlier it was FMS and DBMS and his 11 statements
gives completely gives exactly how an RDBMS works and how it is benifit to business

he mostly relied on mathematics set theory like union, union all ,intersect and minus etc
and also various joins, subqueries with in, not in and exists etc...

its one of the beautiful and revolutionary language which is very simple to learn
its impact is like total database accessing methodologies entirely changed when U comapre
with earlier methodologies...

and even though now ORDBMS is famous still RDBMS is basic for that...
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12574
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 3:38 pm:   Edit PostDelete PostView Post/Check IP

same question.

kakapothe adi set theaory loni codd;s rule anukuntunna nenu matuku.
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 15262
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Monday, January 30, 2006 - 3:35 pm:   Edit PostDelete PostView Post/Check IP

CODD's rule anedhi book peraa maama
G to the O to the O to the C, C to the H to the H to the I ,GOCHI thats what u say...
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 421
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 3:34 pm:   Edit PostDelete PostView Post/Check IP

full indepth concepts kaavali ante interviews kosam...Dr. CODD's rule okkokkati
ee SQL dwara elaa avuddi ani teluskonnavu ante.. no one stop U and U bcome one
of SQL professional.
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 15261
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Monday, January 30, 2006 - 3:27 pm:   Edit PostDelete PostView Post/Check IP

nenu kooda saduvutam start settaa
G to the O to the O to the C, C to the H to the H to the I ,GOCHI thats what u say...
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12573
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 3:19 pm:   Edit PostDelete PostView Post/Check IP

mundu set theaory books sotha.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12572
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 3:19 pm:   Edit PostDelete PostView Post/Check IP

okkamogadu mama, anthe antava, ayithe deniki raado sotha aagu mama. :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 420
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 3:16 pm:   Edit PostDelete PostView Post/Check IP

gochi mama..

avunu intake ee Okka_maggadu mama olu...

ee okka mogaadu id naake sontham...

nannu naa id ni copy kootinchi olu..

nenu 3 count setta elopala seppakapote...
.
.
.
.
.
.
.
.
.
.
..

..
.
.
.
.
.

.
.
.

malla count shuru setta...KIKI....
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 419
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 3:14 pm:   Edit PostDelete PostView Post/Check IP

hemanth mama

SQL baaga raavali ante... sinnappati mathe matics lo SET Theoery baaga vatte
mostly 60% cover ainatte...and syntax yaad ki ettukonnavu ante...
nuvvu king vi aipotaavu mama...

nuvvu tappuga anukoka pote okkati seputaa..

SQL kastam naaku raadu anna person inka software field nunvhi tappukovachhu...

karrect ga one day chaalu maama total SQL nershukovadaaniki....
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12571
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:58 pm:   Edit PostDelete PostView Post/Check IP

naakenduku intha knowledge ledu. :-( naaku kullu vasthundi. :-(
Top of pagePrevious messageNext messageBottom of page Link to this message

Okka_magaadu
Pilla Bewarse
Username: Okka_magaadu

Post Number: 46
Registered: 04-2004
Posted From: 157.91.44.1
Posted on Monday, January 30, 2006 - 2:55 pm:   Edit PostDelete PostView Post/Check IP

Good!

Nenu paatha OM?????
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12570
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:54 pm:   Edit PostDelete PostView Post/Check IP

ipudu ratna mama vachi nenu koda Oracle apps ki vachestha antadu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12569
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:54 pm:   Edit PostDelete PostView Post/Check IP

gochi mama, Thanks for the query mama, kaani okka_magadu mama query super ga pani sesindi. chala chala thanks mama.

aw mama, nedi transfered employees ki pani sethundi mama, simple ga rayataniki. :-)

okka_magadu, gochi, Aw mamalu inkokasari thanks andariki. :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 15260
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Monday, January 30, 2006 - 2:52 pm:   Edit PostDelete PostView Post/Check IP

amaneeee doopings of India naa..nenu nuvve anukunna Legend mamaa
G to the O to the O to the C, C to the H to the H to the I ,GOCHI thats what u say...
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12568
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:52 pm:   Edit PostDelete PostView Post/Check IP

okkamagadu mama query pani sethundi.
Top of pagePrevious messageNext messageBottom of page Link to this message

Okkamogaadu
Pilla Bewarse
Username: Okkamogaadu

Post Number: 418
Registered: 02-2005
Posted From: 164.64.248.174
Posted on Monday, January 30, 2006 - 2:51 pm:   Edit PostDelete PostView Post/Check IP

ee kotta OM olu

nenu erukenaaa..

any way the query is good
anantam ee payanam, avisraantam mee poraatam, madama tippani nee naijam, aluperugani nee payanam. Anna neeve naaku aadarsam.
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 15259
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Monday, January 30, 2006 - 2:46 pm:   Edit PostDelete PostView Post/Check IP

OM maama...baaga raasinaavgaa...SQL lo manchi M thirginodilaa unnav
G to the O to the O to the C, C to the H to the H to the I ,GOCHI thats what u say...
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 15258
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Monday, January 30, 2006 - 2:44 pm:   Edit PostDelete PostView Post/Check IP

maama...maku kooda same scenario..kaani end date null untaadhi...so directly we pull the latest record by asking end_date is null...but if you have same dates,you can use the following process..

For Example table name AB


select employee_id,
start_date,
end_date
from AB
where etc etc tablejoins,conditions
and NOT EXISTS (SELECT 'X' FROM AB2
WHERE AB2.emp_id = AB.emp_id
AND AB2.end_date > AB.end_date)

This should give the latest end date for that particular emp_id

But if you dont want the latest date but just the transferred ID's...elaago Transferred people ki edo random future date isthaarannavgaa..

so

end_date < sysdate

condition isthe only terminated list vasthademo kadhaa...emo naakarthamaindaantlo seppaanu..naaku sarigga artham kaakapothe inka koosantha explain seyyi maama..try settanu..
G to the O to the O to the C, C to the H to the H to the I ,GOCHI thats what u say...
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12567
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:43 pm:   Edit PostDelete PostView Post/Check IP

yes AW mama, nuvvu ichindi trnsfered employees ki pani chesindi. kiki.

okkamagadu mama ichindi terminated ki koda work ayyela undi, aagu soothunna. :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Andhrawala
Desanike Pedda Bewarse
Username: Andhrawala

Post Number: 8902
Registered: 03-2004
Posted From: 192.58.204.226
Posted on Monday, January 30, 2006 - 2:38 pm:   Edit PostDelete PostView Post/Check IP

Hemu,

U can

group by empId having count(*)>1

This will give all employees who are transferred as they will have more than one record
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12566
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:38 pm:   Edit PostDelete PostView Post/Check IP

Thanks okka_magadu mama, aagu chostha.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12565
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:37 pm:   Edit PostDelete PostView Post/Check IP

simple ga cheppalante aa employee file(or table) ni batti, transfered employee list kavali, and also terminated employee list kavali. okadi status T (Terminated) ani undi ante meaning vachedi Terminated ani kadu, vadiki inkoka record undochu with the status of A(active) ante vadu transfered employee annatu.

ippudu cheppu mama. terminated and transfered employees kanukkovataniki query ela rayalo.:-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Okka_magaadu
Pilla Bewarse
Username: Okka_magaadu

Post Number: 45
Registered: 04-2004
Posted From: 157.91.44.1
Posted on Monday, January 30, 2006 - 2:35 pm:   Edit PostDelete PostView Post/Check IP

Something similer might help you.

select 'Tran', E1.ID from Emp E1
Where E1.Status = 'A'
and exists (select 1 from Emp E2
where E2.Status = 'T'
and E2.ID = E1.ID
and E2.End_Dt <= E1.St_dt)
Union
select 'Term', E1.ID from Emp E1
Where E1.Status = 'T'
and Not exists (select 1 from Emp E2
where E2.Status = 'A'
and E2.ID = E1.ID)
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12564
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:29 pm:   Edit PostDelete PostView Post/Check IP

avunu mama.

ippudu US lo maa company lu 3 unnayanuko. vaadu oka chota nunchi inkoka company ki maaradanuko. like division change anuko. mari vadi cost centers, managers etc anni maarathayi ga. company lopala expenses ki GL lo kani inka chala untayi ga, appudu vadini transfer annattu. Transfer ante emi ledu, vadiki 2 records untayi aa file lo. oka record lo vachi start_date end_date untayi, end_date ivvala anuko suppose, aa date untundi. status vachedi T (Terminated) ani untundi. same file lone vadiki inkoka record untundi(employee_id same). aa record lo start_date iyyala untundi. end_date vachi chetha number edo untundi like 01/01/4007 ani, denikante end_date theliyadu, status vachi A (active untundi). company name vachi different vasthundi (ante sampe company ne kakapothe location batti company ki suffix vasthundi. like Accenture NJ, Accenture CA ala annamata.
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse ke Bewarse!
Username: Gochi

Post Number: 15256
Registered: 07-2004
Posted From: 162.136.192.1
Posted on Monday, January 30, 2006 - 2:19 pm:   Edit PostDelete PostView Post/Check IP

maayya...sarigga artham kaaledhu...


employment_start_date, end_date, status unnayi...
status = T (terminated), A (Active) unnayi..

madhyalo "Transfered" endi ...adhi kooda oka status aaa
G to the O to the O to the C, C to the H to the H to the I ,GOCHI thats what u say...
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12563
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:18 pm:   Edit PostDelete PostView Post/Check IP

okati cheppatam marchipoyanu. aa file ni nenu mundu oka table lo load chestha, aa table lo every week details anni details untayi. final ga aa inkoka table lo pedatha aa file lonivi. aa final table lo updated info untundi. kotha employee records vasthe insert chestha. lekapothe update chesthanu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hemanth
Bewarse ke Bewarse!
Username: Hemanth

Post Number: 12562
Registered: 03-2004
Posted From: 57.68.10.185
Posted on Monday, January 30, 2006 - 2:15 pm:   Edit PostDelete PostView Post/Check IP

ippudu naaku every week oka file vasthundi, employee details tho, andulo vaalla updated detailes untayi. employment_start_date, end_date, status etc. status = T (terminated), A (Active) transfered means they maintain 2 records and basically transfered means, they terminate in one place and activate in other place with the same employee id.

Now I want to write a query to find out who are transfered and who are terminated.

evulanna help seyyagalaraa. :-( edo audit vachindi. :-(