Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL puzzle :)

598210Jun 8 2008 — edited Jun 14 2008
I want to find all possible X up to the most highest number possbile with a single SQL.

X - Y = T + Z

where

X as a positive number,
Y is the reverse of X,
T is the sum of each number which X has
Z is the product of each number which X has

like in this example;

63 - 36 = 9 + 18

- Which is the most efficient way of producing for example numbers between 1 and 1000000000000, CONNECT BY from DUAL?
- Is there an alternative way to reverse a number other than undocumented REVERSE function to_number(reverse(to_char(anumber)) this way there will be three function calls for each number,
- What is the best way to break a number into pieces to sum or make product in SQL.

Thank you very much :)

Comments

763212
what is this???
Centinul
Welcome to the forums!

The best place to check for these things is My Oracle Support. For a example a quick search turned up this document:

Identifying Oracle Software For Windows Operating System [ID 834829.1]

Which states that Hyper-V is not supported.
767216
OK, thank you! I couldn't log in to my Oracle because I didn't have the support identifier which was needed in order to complete the first visit wizard. Google, who usually helps me with this type of questions, didn't provide me with any answer.

Br
Carl
767216
I does seem to work though according to this document. I guess its the support that doesn't cover a hyper-v installation.

[http://www.perftuning.com/pdf/Oracle%2010g%20on%20Hyper-V%202008.pdf]
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 12 2008
Added on Jun 8 2008
28 comments
8,086 views