# Search:

Type: Posts; User: jamesravid; Keyword(s):

Page 1 of 7 1

1. ## Thread: pirates of the caribbean

by jamesravid
6
Views
6,972

### Re: pirates of the caribbean

Suresh got the answer correct. But My question has two parts, one part is to answer this question and the second part is to derive a generalized solution for N number of pirates :)
2. ## Thread: Desc a DDL or DML Command

by jamesravid
4
Views
7,437

### Oracle Re: Desc a DDL or DML Command

DESC[RIBE] is neither a DDL command nor DML command.

Please note, DDL - commands are those change the database objects Ex: create table, alter table
DML- are those manupulates data Ex: Update ,...
3. ## Thread: Coconut prolbem

by jamesravid
6
Views
6,806

### Re: Coconut prolbem

The answer is 24.

First man hide 8 and gave monkey 1

remaining are 15

second man hide 5 and gave monkey a one

remaining are 9
4. ## Thread: Prisoners problem....

by jamesravid
10
Views
6,903

### Re: Prisoners problem....

perhaps you did not pay much attention to my solution ;)...just kidding
5. ## Thread: Puzzle for 100 Bulbs

by jamesravid
1
Views
4,565

### Re: Puzzle for 100 Bulbs

He can do it in 20 trips...

Here is my solution,
1. Group 100 switches in to group of 10 each.
2. On all the switch in one group, make a trip and note down the bulbs belong to the group
3....
6. ## Thread: Surrogate Key as Primary Key

by jamesravid
3
Views
1,755

### Re: Surrogate Key as Primary Key

Generally in data warehousing, surrogate keys are preferred over complex primary key. Surrogate keys are just unique identification key with out any intelligence.
7. ## Thread: Select SUM using Row Number in ANY

by jamesravid
2
Views
1,025

### Re: Select SUM using Row Number in ANY

ROWNUM gets generated only at the time of row population. Hence you can never have a conditionlike any(3,4,5)
8. ## Thread: How to describe rank of employee based on deptname and salary

by jamesravid
6
Views
2,177

### Data Warehousing - Re: How to describe rank of employee based on deptname and salary

I think SAL should be ordered in desc order
9. ## Thread: UNION vs UNION ALL

by jamesravid
8
Views
3,630

### Oracle Re: UNION vs UNION ALL

Just to add Suji's answer, UNION ALL has better performance as it does not have to return DISTINCT set of records.
10. ## Thread: AVERAGE AGE

by jamesravid
2
Views
5,028

### Re: AVERAGE AGE

this is just an incomplete question which can not be answered
11. ## Thread: A simple Puzzle

by jamesravid
30
Views
12,426

### Re: A simple Puzzle

through out his life time?? ha ha ha
An interesting question to be fair with you. But some one has to answer this qn :(
12. ## Thread: Thinking puzzle 4 u

by jamesravid
6
Views
8,227

### Re: Thinking puzzle 4 u

It is quite simple.

Let us say earlier each side of the swimming pool is 10m long and oak trees are on each corner.

Now they just need to expand the swimming pool in such a way that each edge...
13. ## Thread: Logic Puzzle

by jamesravid
11
Views
6,948

### Re: Logic Puzzle

Actually they are not facing towards the sea instead they are facing towards the ship.
14. ## Thread: Find the number....

by jamesravid
10
Views
6,429

### Re: Find the number....

It is very simple Sowji,

find LCM of 2,3,4...8 and 9 then subtract 1 from that number. that is it:)

Thanks,
James
15. ## Thread: Get 37 by using five five's

by jamesravid
11
Views
7,659

### Re: Get 37 by using five five's

Here is one answer : ((5+5)/5 )^5 +5

((5+5)/5 )^5 +5 = ((10)/5 )^5 +5
= 2^5 +5
= 32 + 5
= 37

Cheers,
James
16. ## Thread: Chess board?

by jamesravid
7
Views
10,723

### Re: Chess board?

Right approach from Suresh. Hats off man
17. ## Thread: Find the correct boxes

by jamesravid
7
Views
6,919

### Re: Find the correct boxes

It is simple,

I will take one fruit from the box MIXED. If i get apple then the box with the name ORANGE must be mixed and the box 'APPLE' must have oranges.

i can apply the same logic if i get...
18. ## Thread: Convert Gender Column

by jamesravid
8
Views
6,822

### Oracle Re: Convert Gender Column

No need for a correlated query. The following query does the same,

update emp_check a SET gender = decode (gender,'M','F','F','M',gender);
19. ## Thread: calculating the sum of a field in a query with join

by jamesravid
2
Views
1,102

### Oracle Re: calculating the sum of a field in a query with join

If you need only sum of overtime hours then the following query works for u

Select employeeid,sum(overtimehours )
from attendance
group by employeeid

If u want bothe sum of overtime and...
20. ## Thread: Who will shout first...

by jamesravid
9
Views
161,992

### Who will shout first...

4 criminals are caught and are to be punished. The Judge allows them to be freed if they can solve a puzzle. If they do not, they will be hung. They agreed.

The 4 criminals are lined up on some...
21. ## Thread: Call Updated Value in Trigger

by jamesravid
3
Views
1,125

### Oracle Re: Call Updated Value in Trigger

I am not sure what you are talking about.

If you are talking about update DML trigger, then you can get the old and new variables using :old and :new bind variables.
22. ## Thread: Prisoners problem....

by jamesravid
10
Views
6,903

### Re: Prisoners problem....

let us take 89th prisoner . He guesses that the reminder is going to be 88

Hence his guess would be 100+88 -86 =102 (mod 100) = 2

Hope this clears your doubt
23. ## Thread: I lost my Boarding pass

by jamesravid
10
Views
6,833

### Re: I lost my Boarding pass

Hi,

I was also thinking like you. But it looks like the answer is wrong... [:(].

But now I am clear with the right approach and i know the answer [:)].

I would like to give one more chance...
24. ## Thread: Climbing 10 Steps

by jamesravid
8
Views
5,839

### Re: Climbing 10 Steps

lf number of steps is 1.

IF number of steps =2
There are two different ways to finish 11,2

If number of steps =3
There are three different ways to finish 111,12,21

If number of steps =4...
25. ## Thread: Prisoners problem....

by jamesravid
10
Views
6,903

### Re: Prisoners problem....

Sorry for the delay to post my solution.

Let us assume that the sum of all number assigned to 100 prisoners is S(P) and the number assigned to the first prisoner is n1, the number to the second...
Results 1 to 25 of 173
Page 1 of 7 1