473,387 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Oracle 11g code defect with Select SUBSTR funtion

Hi all,

A few weeks ago I posted a question about a potential defect in Oracle 11g. Today I have more details on the error.

Please contact me if you are an Oracle Support engineer, I will like to follow up directly.

The first Query 1 returns the correct value
SELECT SUM(t.debitmst) 270
FROM
(
SELECT
SUBSTR(nls_lower(ledgeraccountnum), 1, 21) as account_substr,
SUM(debitmst) AS debitmst
FROM LEDGERBALANCESTRANSDELTA
GROUP BY ledgeraccountnum
) t;

The query 2 returns null (notice 21 became 20):
SELECT SUM(t.debitmst)
FROM
(
SELECT
SUBSTR(nls_lower(ledgeraccountnum), 1, 20) as account_substr,
SUM(debitmst) AS debitmst
FROM LEDGERBALANCESTRANSDELTA
GROUP BY ledgeraccountnum
) t;

This does not reproduce with Oracle 10g or SQL Server 2005/2008

Regards,
Bertrand
Dec 2 '09 #1
5 5034
debasisdas
8,127 Expert 4TB
I can't find any issue in oracle 10g and nls_lower is not a SQL Server function.
Dec 2 '09 #2
The issue is only with ORA 11g and the script provided is ORA indeed, not an SQL Server function.
Dec 2 '09 #3
debasisdas
8,127 Expert 4TB
Please check for data data consistency across different versions of database and then re run the script.
Dec 3 '09 #4
Already done, data is the same.

My request is to engage officially with Oracle Support team, let me know if you can help.

Regards,
Bertrand
Dec 3 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: A. Barnet | last post by:
Hi, all, I posted a similar message at comp.soft-sys.sas. I used code like the following via SAS PROC SQL pass-thru to create a table named user.tmp in Oracle: drop table user.tmp; create...
4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
8
by: Tavish Muldoon | last post by:
At a high level - what would be involved in switching from Oracle to DB2? Pretty vague, I know - but anyone have experience with this kind of migration? Pointers? Things to look for? Tmuld
3
by: fans hou | last post by:
Hi,I need your help! My SQL runs in oracle and it returns more than 800 rows,but when I try to bind it into a DataGrid with OracleDataReader, It returns no row! Here is the SQL,Why? Is that means...
7
by: Sahar Madahian | last post by:
Hi! I have a girdview that use oracle database, the result is more than more page, how could I show the result in many page? I used AllowPaging="True", but the just the result of page one was...
13
by: lenygold via DBMonster.com | last post by:
I found this problem on ORACLE board. 2 input TABLES: Items Id ItemName 1 Phone 2 Table 3 Lamp 4 TV 5 Stereo
6
by: ghssal | last post by:
HI how can run PL/SQL application as: create or replace function getChecksiffra (in_string varchar2) return number is xSvar number := 0; xNR number := 0; xSumma number := 0; ...
1
by: BiffMaGriff | last post by:
Hello, I have a .net web app with an Oracle back end and I need to audit my database. I created this template trigger that I was using on inserts, edit & deletes however... "CREATE OR REPLACE...
3
by: bcaillet | last post by:
Hi folks, I need your expertise with Oracle. My application is using both SQL and Oracle. When testing the new release of Oracle 11g, one test case is failing and the following code is being...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.