|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
oracle 8.0 subselect bugs
Code:
SELECT * FROM (
SELECT c_rrn
FROM (
SELECT * FROM gvsa.tgvs32_tra, gvsa.tgvs30_esi_tra, gvsa.tgvs31_esi_val, gvsa.tgvs33_soc
WHERE d_ora_arr >= TO_DATE('11062003200000', 'DDMMYYYYHH24MISS')
AND d_ora_arr <= TO_DATE('11062003235959', 'DDMMYYYYHH24MISS')
AND gvsa.tgvs30_esi_tra.c_esi_tra=gvsa.tgvs32_tra.c_esi_tra
AND gvsa.tgvs31_esi_val.c_esi_val=gvsa.tgvs32_tra.c_esi_val
AND gvsa.tgvs33_soc.c_soc=gvsa.tgvs32_tra.c_soc
ORDER BY c_rrn
)
)
WHERE ROWNUM <= 10
in Oracle 8.0 it returns no data ![]() |
|
#2
|
||||
|
||||
|
So what? How can you say it's a bug?
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
||||
|
||||
|
Did the inner sub query gave any output. If so is that the name of the table in your schema
|
|
#4
|
|||
|
|||
|
I read (somewhere) that subselect doesn't support ORDER BY clause.
data returned from my subselect are not in order.. I can't understand.. |
|
#5
|
||||
|
||||
|
Let's see if I got the problem:
You are running this query: Quote:
which contains a c_rrn column, right? So why run a: Quote:
when you can select it directly? Then you want only the first ten results, right? |
|
#6
|
|||
|
|||
|
yes, the problem is more complex than you think, but I have not explained very well the situation.
that's because my english is not so good, but now I try to express me better. I have to paginate my data (PHP application) I tried to optimize my select Code:
SELECT c_rrn, c_act_cod "Act code"
FROM gvsa.tgvs32_tra
WHERE d_ora_arr >= TO_DATE('11032003000000', 'DDMMYYYYHH24MISS')
AND d_ora_arr <= TO_DATE('11032004171007', 'DDMMYYYYHH24MISS') ORDER BY c_rrn
can you help me? thank you very much!! |
|
#7
|
||||
|
||||
|
The best way (IMHO) to paginate data in oracle is to use a Stored Procedure, use Google and you should find examples
|
|
#8
|
|||
|
|||
|
Quote:
thank you ![]() |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > oracle 8.0 subselect bugs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|