SQL QUIZ-- Interview laki upayogapada...   Independent houses near kukatpally | Apartments in Pragathi Nagar | AndhraVaani.com | Log Out | Topics | Search
Register | Edit Profile

Bewarse TalkArchivesCine Talk - Reviews, Gossips, Insider Info etc.Archive through May 23, 2005 � SQL QUIZ-- Interview laki upayogapadavochhu Previous Next

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

Rediff
Vooriki Bewarse
Username: Rediff

Post Number: 3974
Registered: 03-2004
Posted From: 67.190.37.246

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, May 20, 2005 - 5:46 am:   Edit PostDelete PostView Post/Check IP

:-O
Top of pagePrevious messageNext messageBottom of page Link to this message

Deithadi
Desanike Pedda Bewarse
Username: Deithadi

Post Number: 2851
Registered: 03-2004
Posted From: 69.220.132.107

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, May 20, 2005 - 5:45 am:   Edit PostDelete PostView Post/Check IP

hammaya Rediff ki ippatiki oka software peru anna palakadam vochindi :-O
Top of pagePrevious messageNext messageBottom of page Link to this message

J2ee
Vooriki Bewarse
Username: J2ee

Post Number: 4739
Registered: 08-2004
Posted From: 67.85.230.94

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, May 20, 2005 - 5:35 am:   Edit PostDelete PostView Post/Check IP

Hello Rajahmundry mama bank ante neevu indian bank mamava. EE avathaaram eppudu ethaavu baagunaava
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 399
Registered: 05-2005
Posted From: 129.188.33.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, May 20, 2005 - 2:56 am:   Edit PostDelete PostView Post/Check IP

Rajahmundru garu.. am also working DWH.. i worked on informatica, OWB, BO, Cognos toold
Top of pagePrevious messageNext messageBottom of page Link to this message

Naatu
Pilla Bewarse
Username: Naatu

Post Number: 481
Registered: 03-2004
Posted From: 192.44.136.103

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:23 pm:   Edit PostDelete PostView Post/Check IP

Ikkada ma baasha vachinavaalu unaara evarayyina..tk mama neenu appudu call chesaanu ah position still opened..any updates on that mama
Top of pagePrevious messageNext messageBottom of page Link to this message

Truecolours
Vooriki Bewarse
Username: Truecolours

Post Number: 3588
Registered: 11-2004
Posted From: 12.153.145.6

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:52 pm:   Edit PostDelete PostView Post/Check IP

nuvvekkaduntavoo emi sethuntavoo anni thelusu lee kaani emial id ledhu..
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 877
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:51 pm:   Edit PostDelete PostView Post/Check IP

Not at all, nenu code rase stage daati poya. Pure design. Think cheyyadam ideas ivvadam
Flow ni narrate cheyyadam.

Mari urgent ayite SQL queries ni optimize cheyyadam. ( adi interest unte )
Top of pagePrevious messageNext messageBottom of page Link to this message

Rediff
Vooriki Bewarse
Username: Rediff

Post Number: 3970
Registered: 03-2004
Posted From: 159.37.7.93

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:48 pm:   Edit PostDelete PostView Post/Check IP

Rajahmundry mama,
DW designer.. emanna tool use chestunnavaa mama??

Iam using DataStage
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 876
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:40 pm:   Edit PostDelete PostView Post/Check IP

Guys
Naa email id ravis_7777@yahoo.com
Present gaa Dataware house designer gaa work chestunna.
Email eppudina kottavochhu. Response veelu ni batti istoo untanu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Truecolours
Vooriki Bewarse
Username: Truecolours

Post Number: 3585
Registered: 11-2004
Posted From: 12.153.145.6

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:37 pm:   Edit PostDelete PostView Post/Check IP

banku mama ee email id endhi? ninna adigithey inka ivvaledhu
naa email id thodakottu@yahoo.com
Top of pagePrevious messageNext messageBottom of page Link to this message

Avinash
Pilla Bewarse
Username: Avinash

Post Number: 46
Registered: 03-2005
Posted From: 209.234.142.80

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:34 pm:   Edit PostDelete PostView Post/Check IP

If I can ask, guys what technologies you work on

For myself I am into ERP(backend Oracle most of the time) and worked on .NET, Web Apps and Content Management before
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 875
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:31 pm:   Edit PostDelete PostView Post/Check IP

Here is the Answer for previous question:

Select child from (
select * from relation where child<>parent )
start with parent=10
connect by prior child=parent


-- Guys mee daggara manchi questions unte post cheyyandi nenu kooda kotta vishayalu nerchukonta.
Top of pagePrevious messageNext messageBottom of page Link to this message

Avinash
Pilla Bewarse
Username: Avinash

Post Number: 45
Registered: 03-2005
Posted From: 209.234.142.80

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:28 pm:   Edit PostDelete PostView Post/Check IP

Rajahmundry, HM and Halycon,

Good work guys, almost covered all the points

Sorry I went to urgent meeting and had to be there for 2 hours
and cud not post.

Plz open more tech threads which are informative !!
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 874
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:09 pm:   Edit PostDelete PostView Post/Check IP

Nayakudu garu
ee data lo kasta teda undi same parent and same child undi.

So I need complete query.
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1104
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:06 pm:   Edit PostDelete PostView Post/Check IP

>>a trigger on Delete
won't catch a Truncate statement because it is NOT LOGGED

yeah, this is what confuses me w.r.to minimally logged. Anyways, we need to dig lot more into this to get appropriate reasoning. :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 388
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 1:05 pm:   Edit PostDelete PostView Post/Check IP

connect by clause use cheyyali
Top of pagePrevious messageNext messageBottom of page Link to this message

Halcyon
Pilla Bewarse
Username: Halcyon

Post Number: 118
Registered: 09-2004
Posted From: 68.213.245.195

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:59 pm:   Edit PostDelete PostView Post/Check IP

>>when truncate is minimally logged transaction,
>>why can't it be used in triggers?


What a loaded question?

I THINK the operating word is "minimally" logged.
If you look at the documentation, a trigger on Delete
won't catch a Truncate statement because it is NOT LOGGED
and may be that is the same reasoning that will be given
for not supporting triggers on Truncate.

So if you read between the lines, what is logged is, good
enough to rollback but not enough for a Trigger.

So, I am not quite sure what the reasoning behind it is.
But other databases support Triggers on many more events
than just INSERT, UPDATE or DELETE, right?
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 873
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:59 pm:   Edit PostDelete PostView Post/Check IP

Table RELATION


PARENT CHILD
10 10 ( this means 10 is parent for 10)
10 20 ( this means 10 is parent for 20 & 30)
10 30
20 40 ( 20 is having 3 childrent 40,50,60 & 10 is having 3 grand children 40,50,60 )
20 50
20 60
50 70
70 80
80 90
200 210 ( this is separate family in the same table 200 is having 210 as children )
210 220
220 230

Now I want to list all the descendents ( ante children , grand children, grand grand .. ) for Parent=10
Answer: 10 ki descendents = 20,30,40,50,60,70,80,90
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 375
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:43 pm:   Edit PostDelete PostView Post/Check IP

ok mama
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 872
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:42 pm:   Edit PostDelete PostView Post/Check IP

Cool DENSE_RANK is correct answer. Malli malli 5 stars veyyalenu, oka sari chalu kada
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 871
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:41 pm:   Edit PostDelete PostView Post/Check IP

Nee query use cheste ee result vostundi:

ENO SAL TOPN
50 5000 1
40 3000 2
20 2000 3
25 2000 3
30 1500 5
10 1000 6


Number 4 miss avutundi
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 373
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:39 pm:   Edit PostDelete PostView Post/Check IP

ok .. appudu dense_rank use cheyyali
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 372
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:39 pm:   Edit PostDelete PostView Post/Check IP

thappu ekkadabba....

select empno, sal, rnk
(
select empno, sal, rank() over(sal desc) as rnk from emp) order by rnk asc
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 870
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:38 pm:   Edit PostDelete PostView Post/Check IP

Kaiser mama nee query lo unna mistake emito nuvve cheppu. Akkada same salary iddariki undi ani observe cheyyi.
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 371
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:37 pm:   Edit PostDelete PostView Post/Check IP

nene mama william ni
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 869
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:37 pm:   Edit PostDelete PostView Post/Check IP

William already neeku 5 stars vesa quick answer ki but chinna mistake undi emito cheppuko
Top of pagePrevious messageNext messageBottom of page Link to this message

Kaiser_william
Pilla Bewarse
Username: Kaiser_william

Post Number: 2
Registered: 05-2005
Posted From: 136.182.2.222

Rating: 
Votes: 1 (Vote!)

Posted on Thursday, May 19, 2005 - 12:35 pm:   Edit PostDelete PostView Post/Check IP

select empno, sal, rank() over(sal desc) as rnk from emp
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 868
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:33 pm:   Edit PostDelete PostView Post/Check IP

Here is EMP table
-----------------

EMPNO SAL
10 1000
20 2000
25 2000
30 1500
40 3000
50 5000

Now I want output
-----------------

EMPNO SAL TOPN
50 5000 1
40 3000 2
20 2000 3
25 2000 3
30 1500 4
10 1000 5


Ante salary meeda Evaru top nunchi ee position lo unnaro output kavali.
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1097
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 12:00 pm:   Edit PostDelete PostView Post/Check IP

Halcyon garu, your second link is quite informative. Thanks for the link :-) But, when truncate is minimally logged transaction, why can't it be used in triggers? In the sense, when triggers can be fired at delete, why not at truncate?
Top of pagePrevious messageNext messageBottom of page Link to this message

Halcyon
Pilla Bewarse
Username: Halcyon

Post Number: 117
Registered: 09-2004
Posted From: 68.213.245.195

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:47 am:   Edit PostDelete PostView Post/Check IP

Well, I promptly found a Microsoft support issue right away.
http://support.microsoft.com/default.aspx?scid=kb% 3BEN-US%3B149939

But, this is the one I think I read about
http://www.sql-server-performance.com/q&a118.asp
Top of pagePrevious messageNext messageBottom of page Link to this message

Halcyon
Pilla Bewarse
Username: Halcyon

Post Number: 116
Registered: 09-2004
Posted From: 68.213.245.195

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:38 am:   Edit PostDelete PostView Post/Check IP

>>Interesting ....are you sure? did you ever try >>to rollback a truncate transaction?

I never tried it, maybe I should try it just for
the heck of it. But we were going back and forth
debating on it and I thought I found some info.
on some websites detailing that. Let me see if
I can find it now.
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 867
Registered: 03-2005
Posted From: 68.164.156.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:37 am:   Edit PostDelete PostView Post/Check IP

Good Catch Halcyon:

HM,

Do you realize that you gave a pay cut by redusing their
salaries to 1/10th and 1/20 th respectively.


Honeymist:
sal=sal*1.1 , sal=sal*1.05

Good catch Halcyon
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1095
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:33 am:   Edit PostDelete PostView Post/Check IP

>>can be used within a transaction for a rollback at least in SQL server.

Interesting ....are you sure? did you ever try to rollback a truncate transaction?

>>Do you realize that you gave a pay cut by redusing their salaries

good catch, I was in a hurry to give out the answer :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Halcyon
Pilla Bewarse
Username: Halcyon

Post Number: 115
Registered: 09-2004
Posted From: 68.213.245.195

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:21 am:   Edit PostDelete PostView Post/Check IP

Truncate deallocates the pages where the data is
stored as opposed to Delete which removes the data of each row. I believe it is a misconception that Truncate cannot be rolledback.
Although it is minimally logged and can be used
within a transaction for a rollback at least in SQL server. But I never had the need to do it though. One more thing Truncate resets the identity seed
if you are using it in the table. Delete does not.

HM,

Do you realize that you gave a pay cut by redusing their
salaries to 1/10th and 1/20 th respectively.
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 354
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:10 am:   Edit PostDelete PostView Post/Check IP

adagandi.. nenu answer cheyyataniki try chestha.. inka nerchokovalsindi entho vundi...
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 866
Registered: 03-2005
Posted From: 68.164.156.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:08 am:   Edit PostDelete PostView Post/Check IP

Honey mist super gaa cheppavu

Next question 1 hour lo type chesta, snanam chesi office ki poyi vosta.
Intalo meere adagandi questions.
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1093
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:05 am:   Edit PostDelete PostView Post/Check IP

oops , I used wild char $ instead of %, my bad.

update emp set sal = (case when name like ''A$'' or name like ''E%'' or name like ''I%'' or name like ''O%'' or name like ''U%'' then sal*0.1 else sal*0.05);
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 350
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:04 am:   Edit PostDelete PostView Post/Check IP

hmmm
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1092
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:02 am:   Edit PostDelete PostView Post/Check IP

update emp set sal = (case when name like ''A$'' or name like ''E$'' or name like ''I$' or name like ''O$'' or name like ''U$'' then sal*0.1' else sal*0.05);
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 348
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 11:01 am:   Edit PostDelete PostView Post/Check IP

ivvandi
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 865
Registered: 03-2005
Posted From: 68.164.156.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:59 am:   Edit PostDelete PostView Post/Check IP

Ledu mama, idi chala simple CLUE immantava?
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 347
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:59 am:   Edit PostDelete PostView Post/Check IP

Oracle 9i Advanced featrures ani oka PPT vundedi naa daggar.. danlo chusaa... multiple inserts kuda cheyochu
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 346
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:59 am:   Edit PostDelete PostView Post/Check IP

nenu cheppindadi correctena andi
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 864
Registered: 03-2005
Posted From: 68.164.156.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:58 am:   Edit PostDelete PostView Post/Check IP

Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 343
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:55 am:   Edit PostDelete PostView Post/Check IP

Rajahmundry,

Oracle 9i lo kothaga oka feature add ayyindi DWH perspectiv elo.. aa UPDATE statement use chesi idi cheyyochu.. kapotye syntax naa daggar ledu
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 863
Registered: 03-2005
Posted From: 68.164.156.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:53 am:   Edit PostDelete PostView Post/Check IP

Good work TMBUFF and NAYAKUDU
Previous question baaga answer chesaru.


Next question::
TABLE EMP lo unna EMPLOYEES ANDARIKI 10% SALARY HIKE CHEYYANDI ( UPDATE COMMAND) IF THEIR NAME STARTS WITH 'A' OR 'E' OR 'I' OR 'U' OR 'O'
otherwise give them 5% RAISE.

EE RENDU UPDATES OKE SQL STATEMENTS LO JARAGALI.
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 342
Registered: 05-2005
Posted From: 136.182.2.222

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:52 am:   Edit PostDelete PostView Post/Check IP

also, truncate resets the system-generated PK in a table to 0.. where as delete doesn't do..
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1091
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:50 am:   Edit PostDelete PostView Post/Check IP

also, we can delete using filters, but for truncate we can not apply any filters.
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 862
Registered: 03-2005
Posted From: 68.164.156.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:49 am:   Edit PostDelete PostView Post/Check IP

Truncate chesina tarvata rollback cheyyalevu, where are delete chesina tarvata rollback cheyyagalavu.

PLUS
TRUNCATE can change highest water mark or lowest water mark ( internal to database ) change chestundi, where as delete command change cheyyadu.

Example:

Oka table lo 10,000,000 records unnayi anuko

aa table lo first anii records delete chesina highest water mark 10,000,000 daggare untundi, lower water mark 1 daggara untundi. Because of this inserts or updates very slow ( after delete command ). Where as truncate cheste ee rendu water marks 0 daggarake vochhestayi. Inserts deletes very fast.
Top of pagePrevious messageNext messageBottom of page Link to this message

Avinash
Pilla Bewarse
Username: Avinash

Post Number: 44
Registered: 03-2005
Posted From: 67.125.135.204

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 10:16 am:   Edit PostDelete PostView Post/Check IP

Good Thread Guys!!

Ok from me....What is the difference between TRUNCATE and DELETE

Plz dont answer by doing googling...
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1082
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 9:21 am:   Edit PostDelete PostView Post/Check IP

Nice thread.

Tmbuff garu, my answer for the first Q is 100% correct. However, yours is an alternate method :-) You have used LOG function and I used LOG10 function, that's the difference.
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 581
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:32 am:   Edit PostDelete PostView Post/Check IP

nenu GF ni kadhu..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 279
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:32 am:   Edit PostDelete PostView Post/Check IP

Mayya neevu godfather vi kada... naku thelusule.. mayya neevu ye ID lo vunna gurthu padatha... KIKIKIKI
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 579
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:30 am:   Edit PostDelete PostView Post/Check IP

nenu 12 hrs taruvata ID marchesta.. apudu etti settavu..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 278
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:22 am:   Edit PostDelete PostView Post/Check IP

bond mayya... inka neeku vunna time 12 hrs.. maa buddodi cinema hit ayyidii.. ninnu inka kummutha nenu
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 576
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:19 am:   Edit PostDelete PostView Post/Check IP

//1 & 3 are duplicate

nijama..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 277
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:17 am:   Edit PostDelete PostView Post/Check IP

sorry 1 & 3 are duplicate
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 276
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:17 am:   Edit PostDelete PostView Post/Check IP

tmbuff garu...

when i said duplicate rows, what i meant is the table has many columns and the values of all columns match for any two rows

eg.
C1 C2 C3
1 2 3
2 3 4
1 2 3

now i say 1 & 2 are duplicate
Top of pagePrevious messageNext messageBottom of page Link to this message

Tmbuff
Pilla Bewarse
Username: Tmbuff

Post Number: 137
Registered: 04-2004
Posted From: 24.5.173.205

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:06 am:   Edit PostDelete PostView Post/Check IP

yes nayakudu mama. I implemented that, the results are very fast. that's the reason I gave that
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 275
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 4:02 am:   Edit PostDelete PostView Post/Check IP

delete from USER
where rowid in (
select rid
from
(select rowid rid,
row_number() over
(partition by
USER_ID
order by rowid) rn
from USER
)
where rn <> 1
)
good mama..
but, did u copy from asktom ...
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 273
Registered: 05-2005
Posted From: 129.188.33.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:59 am:   Edit PostDelete PostView Post/Check IP

Badri mayya,... nenu data warehousing lo work chethunna... chala sarlu ee requirement vuntundi..
Top of pagePrevious messageNext messageBottom of page Link to this message

Tmbuff
Pilla Bewarse
Username: Tmbuff

Post Number: 136
Registered: 04-2004
Posted From: 24.5.173.205

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:56 am:   Edit PostDelete PostView Post/Check IP

nayakudu mama..

for 1st question answer given by honeymist there is a small correction:
here is the correct statement:
select POWER(10, SUM(LOG(10,VAL_column))) as final_value from DATA_table

to explain that: I will explain rajahmandy mama's answer --

exp(ln(2))*exp(ln(3)) = exp(ln(2)+ln(3)) since in oracle addition is simple use this condition.

to answer your deleting duplicates, lets assume there is a table user USER with duplicate USER_ID'S

delete from USER
where rowid in (
select rid
from
(select rowid rid,
row_number() over
(partition by
USER_ID
order by rowid) rn
from USER
)
where rn <> 1

)

the code in red brings all the records by user_Id where rn <>1

Hope that is clear enough
Top of pagePrevious messageNext messageBottom of page Link to this message

Harry_potter
Pilla Bewarse
Username: Harry_potter

Post Number: 10
Registered: 05-2005
Posted From: 202.141.43.24

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:56 am:   Edit PostDelete PostView Post/Check IP

>>One more question...
I have a table with one column... now i want to transpose the data...
The values in the column are
1
2
3
I want the output like ..

1 2 3


direct commands....

row2col(matrix name)
trans(matrix name)
Top of pagePrevious messageNext messageBottom of page Link to this message

Badri
Vooriki Bewarse
Username: Badri

Post Number: 5905
Registered: 09-2004
Posted From: 130.243.43.217

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:55 am:   Edit PostDelete PostView Post/Check IP

nayakudu,

columns ni transpose cheyyalsina avasaram deniki vastundhi....
Top of pagePrevious messageNext messageBottom of page Link to this message

Badri
Vooriki Bewarse
Username: Badri

Post Number: 5904
Registered: 09-2004
Posted From: 130.243.43.217

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:53 am:   Edit PostDelete PostView Post/Check IP

pistha
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 560
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:53 am:   Edit PostDelete PostView Post/Check IP

kasak gaa bale seppav.. nenu ipude try chesa.. kani naa compiler pichi munda kuda villa latide.. vopukovataledu.. :-(
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 272
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:53 am:   Edit PostDelete PostView Post/Check IP

One more question...
I have a table with one column... now i want to transpose the data...
The values in the column are
1
2
3
I want the output like ..

1 2 3
Top of pagePrevious messageNext messageBottom of page Link to this message

Thikkana
Pilla Bewarse
Username: Thikkana

Post Number: 11
Registered: 05-2005
Posted From: 202.141.43.24

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:52 am:   Edit PostDelete PostView Post/Check IP

manisannnaaka ravvantha kalaaposana undaala......appudu eriety gaa syntax maarsochu kadaa...eppudu okatenaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 271
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:51 am:   Edit PostDelete PostView Post/Check IP

pistha mayya... max() aina ok min() aina ok... KIKIKIKI
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 556
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:48 am:   Edit PostDelete PostView Post/Check IP

illaki eriety ante ishtam vundadu mama.. epudu attage vundali..
Top of pagePrevious messageNext messageBottom of page Link to this message

Pistha
Pilla Bewarse
Username: Pistha

Post Number: 23
Registered: 05-2005
Posted From: 202.141.43.24

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:47 am:   Edit PostDelete PostView Post/Check IP

badrio thappu....

delete table_a
where rowid not in
(select max(rowid) from table_a
group by row1, column2);
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 270
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:47 am:   Edit PostDelete PostView Post/Check IP

badri mayya..
Top of pagePrevious messageNext messageBottom of page Link to this message

Thingarodu
Bewarse
Username: Thingarodu

Post Number: 1983
Registered: 04-2005
Posted From: 62.249.194.170

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:46 am:   Edit PostDelete PostView Post/Check IP

ento
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 269
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:45 am:   Edit PostDelete PostView Post/Check IP

max(length(substr(to_char(val), instr(to_char(val),'.')))-1)

yeha ee expression lo correctgane saripoyayi ga brackets.. ekkuva ekkada vunnayi
Top of pagePrevious messageNext messageBottom of page Link to this message

Badri
Vooriki Bewarse
Username: Badri

Post Number: 5901
Registered: 09-2004
Posted From: 130.243.43.217

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:44 am:   Edit PostDelete PostView Post/Check IP

//please frame an SQL statement to delete the duplicate rows from a table

delete table_a
where rowid not in
(select min(rowid) from table_a
group by column1, column2);
Top of pagePrevious messageNext messageBottom of page Link to this message

Pistha
Pilla Bewarse
Username: Pistha

Post Number: 22
Registered: 05-2005
Posted From: 202.141.43.24

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:43 am:   Edit PostDelete PostView Post/Check IP

mari eppudu round brackets enduku eriety gaa floweer brackets, square brackets use seyyochugaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 551
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:41 am:   Edit PostDelete PostView Post/Check IP

time pass ki..
Top of pagePrevious messageNext messageBottom of page Link to this message

Kasakbabu
Vooriki Bewarse
Username: Kasakbabu

Post Number: 4896
Registered: 11-2004
Posted From: 202.141.43.24

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:39 am:   Edit PostDelete PostView Post/Check IP

anni brackets vaaduthunnaaru endi
Top of pagePrevious messageNext messageBottom of page Link to this message

Jamesbond
Kurra Bewarse
Username: Jamesbond

Post Number: 546
Registered: 07-2004
Posted From: 80.63.180.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:36 am:   Edit PostDelete PostView Post/Check IP

nayakudu pakka thread loki raa..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 267
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:27 am:   Edit PostDelete PostView Post/Check IP

oka question mayya...

please frame an SQL statement to delete the duplicate rows from a table
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Pilla Bewarse
Username: Nayakudu

Post Number: 266
Registered: 05-2005
Posted From: 136.182.2.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:17 am:   Edit PostDelete PostView Post/Check IP

Rajahmundry mayya.. nee daggara chala vishayam vundi... konchem ee expression explain cheyyi mayya

POWER(10, SUM(LOG10(VAL_column))) aina interviews lo ilanti Q's aduguthara.. amani
Top of pagePrevious messageNext messageBottom of page Link to this message

Tmbuff
Pilla Bewarse
Username: Tmbuff

Post Number: 135
Registered: 04-2004
Posted From: 24.5.173.205

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, May 19, 2005 - 3:13 am:   Edit PostDelete PostView Post/Check IP

good questions..

first one was verygood. for second question here is my answer.. may be this can be done in more simpler fashion...

select max(length(substr(to_char(val), instr(to_char(val),'.')))-1) from data

can you send me if you have list of questions to tmbuff@hotmail.com

thx
Top of pagePrevious messageNext messageBottom of page Link to this message

Truecolours
Vooriki Bewarse
Username: Truecolours

Post Number: 3520
Registered: 11-2004
Posted From: 67.187.29.245

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 9:49 pm:   Edit PostDelete PostView Post/Check IP

banku mama nee email id ivvu mama
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 861
Registered: 03-2005
Posted From: 68.164.158.79

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 9:27 pm:   Edit PostDelete PostView Post/Check IP

Sure alludu.

Honey mist ichhina answer ardham ayyinda?
Top of pagePrevious messageNext messageBottom of page Link to this message

Jackson
Desanike Pedda Bewarse
Username: Jackson

Post Number: 10828
Registered: 03-2004
Posted From: 24.94.197.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 9:00 pm:   Edit PostDelete PostView Post/Check IP

Banku mama SQL materials vunte pampu mama..
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 860
Registered: 03-2005
Posted From: 68.164.158.79

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 7:51 pm:   Edit PostDelete PostView Post/Check IP

Inko question:

In table DATA there is a column VAL with data type NUMBER ( it can store decimal values )

Eee table values ex:

12.345
123.45
12345
.12345

Now findout max number of decimal places for column VAL in this table DATA

ante answer 5 ( becuase .12345 having 5 decimal places )
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 859
Registered: 03-2005
Posted From: 68.164.158.79

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 7:48 pm:   Edit PostDelete PostView Post/Check IP

Honey Mist mama Anduko naa fivestars.
Eee question oka 100 mandini adigi unta evvaru cheppaledu, andukane ikkada interview lalo select cheyyaledu Good answer.

or base 10 kakunda Base e to raste inka better

select exp(sum(ln(val))) from data;
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1081
Registered: 04-2004
Posted From: 66.237.36.130

Rating: 
Votes: 1 (Vote!)

Posted on Wednesday, May 18, 2005 - 5:50 pm:   Edit PostDelete PostView Post/Check IP

It was a good execise for me, thanks :-)

here you go -

select POWER(10, SUM(LOG10(VAL_column))) as final_value from DATA_table
Top of pagePrevious messageNext messageBottom of page Link to this message

Esscuseme
Pilla Bewarse
Username: Esscuseme

Post Number: 403
Registered: 03-2005
Posted From: 208.51.197.126

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 5:38 pm:   Edit PostDelete PostView Post/Check IP

null values undochha mama
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1080
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 5:33 pm:   Edit PostDelete PostView Post/Check IP

oops I misunderstood the question, please ignore ....
Top of pagePrevious messageNext messageBottom of page Link to this message

Honeymist
Bewarse
Username: Honeymist

Post Number: 1079
Registered: 04-2004
Posted From: 66.237.36.130

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 5:28 pm:   Edit PostDelete PostView Post/Check IP

select sum(val_column)/@@rowcount as final_value from data_table
Top of pagePrevious messageNext messageBottom of page Link to this message

Rajahmundry
Kurra Bewarse
Username: Rajahmundry

Post Number: 858
Registered: 03-2005
Posted From: 209.172.81.133

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, May 18, 2005 - 5:06 pm:   Edit PostDelete PostView Post/Check IP

Table name "Data" andulo oka column di aa column type number aa column name "Val"

Aa column lo values anni 1 to 100 range lo untayi values repeat avvochhu or different values undavochhu

Example of table "Data"

Val
---
1
5
3
5
7
22


like this

Ippudu naaku oka single query lo aa table lo unna "Val" column lo values anni multiply chesi enta vostundo cheppali

PlSQL kakunda SQL lo oka query lo rayagalama?