![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have a view V_BASE. Now I created a query with the following structure: WITH w1 AS ( SELECT ..... V_BASE ....) SELECT * FROM w1 Everything works fine. Now I changed to WITH w1 AS ( SELECT ..... V_BASE ....), * *w2 AS (SELECT ... w1 ...), * *w3 AS (SELECT ... w1...) SELECT * FROM w1 UNION ALL SELECT * FROM w2 WHERE 1=0 UNION ALL SELECT * FROM w3 WHERE 1=0 And suddenly I get a different result, one date column in w1 changed its values by exactly one month. The "WHERE 1=0" is just to turn off w2 and w3, I will it on again once that I fixed the error. Has anybody any idea how or why w2 and w3 could influence the result of w1? I work on Oracle 9. I checked the structure carefully usinghttp://www.sqlinform.com/ to make sure that the problem is not due to a wrong bracket or something like that. Or could w1, w2 and w3 even influence the results of V_BASE? Thanks and Best, Hans |
#3
| |||
| |||
|
|
Hello, I have a view V_BASE. Now I created a query with the following structure: WITH w1 AS ( SELECT ..... V_BASE ....) SELECT * FROM w1 Everything works fine. Now I changed to WITH w1 AS ( SELECT ..... V_BASE ....), * *w2 AS (SELECT ... w1 ...), * *w3 AS (SELECT ... w1...) SELECT * FROM w1 UNION ALL SELECT * FROM w2 WHERE 1=0 UNION ALL SELECT * FROM w3 WHERE 1=0 And suddenly I get a different result, one date column in w1 changed its values by exactly one month. The "WHERE 1=0" is just to turn off w2 and w3, I will it on again once that I fixed the error. Has anybody any idea how or why w2 and w3 could influence the result of w1? I work on Oracle 9. I checked the structure carefully usinghttp://www.sqlinform.com/ to make sure that the problem is not due to a wrong bracket or something like that. Or could w1, w2 and w3 even influence the results of V_BASE? Thanks and Best, Hans |
#4
| |||
| |||
|
|
Hello, I have a view V_BASE. Now I created a query with the following structure: WITH w1 AS ( SELECT ..... V_BASE ....) SELECT * FROM w1 Everything works fine. Now I changed to WITH w1 AS ( SELECT ..... V_BASE ....), * *w2 AS (SELECT ... w1 ...), * *w3 AS (SELECT ... w1...) SELECT * FROM w1 UNION ALL SELECT * FROM w2 WHERE 1=0 UNION ALL SELECT * FROM w3 WHERE 1=0 And suddenly I get a different result, one date column in w1 changed its values by exactly one month. The "WHERE 1=0" is just to turn off w2 and w3, I will it on again once that I fixed the error. Has anybody any idea how or why w2 and w3 could influence the result of w1? I work on Oracle 9. I checked the structure carefully usinghttp://www.sqlinform.com/ to make sure that the problem is not due to a wrong bracket or something like that. Or could w1, w2 and w3 even influence the results of V_BASE? Thanks and Best, Hans |
#5
| |||
| |||
|
|
Hello, I have a view V_BASE. Now I created a query with the following structure: WITH w1 AS ( SELECT ..... V_BASE ....) SELECT * FROM w1 Everything works fine. Now I changed to WITH w1 AS ( SELECT ..... V_BASE ....), * *w2 AS (SELECT ... w1 ...), * *w3 AS (SELECT ... w1...) SELECT * FROM w1 UNION ALL SELECT * FROM w2 WHERE 1=0 UNION ALL SELECT * FROM w3 WHERE 1=0 And suddenly I get a different result, one date column in w1 changed its values by exactly one month. The "WHERE 1=0" is just to turn off w2 and w3, I will it on again once that I fixed the error. Has anybody any idea how or why w2 and w3 could influence the result of w1? I work on Oracle 9. I checked the structure carefully usinghttp://www.sqlinform.com/ to make sure that the problem is not due to a wrong bracket or something like that. Or could w1, w2 and w3 even influence the results of V_BASE? Thanks and Best, Hans |
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
|
Hello, Thanks for your reply. Actually I was wrong, I do not work on Oracle 9. Here is the entry of v$version: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production I hope that you or someone else will be able to help me with this mystery. Best, Hans |
![]() |
| Thread Tools | |
| Display Modes | |
| |