473,657 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why length()/dump() return different substring length values ??

I have a table with a CHAR column which stored a COBOL redefined
record.
I tried to retrieve part of the field from the column with Oracle
substr function.

Here is one of example: The SQL/result are shown below:
SQL:
select
length(substr(M Y_COLUMN,36,8)) str_length,
dump(substr(MY_ COLUMN,36,8)) INFO,
rawtohex(substr (MY_COLUMN,36,8 )) raw_value
from TABLEX
Result:
str_length:8
INFO :Typ=1 Len=10: 0,0,0,0,7,151,2 37,139,70,89
rawtohex :000000000797ED 8B4659

The value returns by length function is 8 which is what I expected.
The value returns by dump function is with LEN=10 is not what I
expected.

Can anyone can explain why the two Oracle functions (length() and
dump()) return different length values for the same field ?

THANKS

KEN
Jul 19 '05 #1
0 3835

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
6238
by: fdunne2 | last post by:
The following C-code implements a simple FIR filter: //realtime filter demo #include <stdio.h> #include <stdlib.h> //function defination float rtFilter1(float *num, float *den, float *xPrev, float *yPrev);
0
391
by: John Mason | last post by:
Hi, I have developed an asp.net application that uses forms authentication. I have a local install and a remotely hosted install of the application. Intermittently the remote application falls over with an error (see below for details). This seems to happen on different pages after an asp forms button is clicked, and brings down the whole application when it does happen. When it happens you cannot browse to any page within the...
2
3149
by: manmit.walia | last post by:
Hello All and Thank You for your time, I am stuck on this exception handleing error. The problem is that when I run my application the application works perfect but sometimes, I get this error. I do not know where it is causing it but my guess would be something with the function below. Any help would be greatfull, as this would be a learning experience for me. For this example: swTitle.Text = "AutoCAD 2004" After the user selects the...
2
1681
by: gordon | last post by:
Hi I am writing a short app that will collect some information and produce a text file based on that information. One of the values that goes into this text box must be max of 8 characters long - otherwise it should be truncated to 8. I used a statement based on if the length is > 8 then substring it to 8 but i couldnt get the code to work.
2
26573
by: Gidi | last post by:
Hello, I've a strange problem with substring function. I'm geting a string from my SQL DataBase and i want to split it to two substings. here is what i do: if(temp.Length>80 && temp.Length<=160) {
6
9262
by: kellygreer1 | last post by:
What is a good one line method for doing a "length safe" String.Substring? The VB classes offer up the old Left function so that string s = Microsoft.VisualBasic.Left("kelly",200) // s will = "kelly" with no error // but string s2 = "kelly".Substring(0,200) // results in // ArgumentOutOfRangeException
24
4819
by: garyusenet | last post by:
I'm working on a data file and can't find any common delimmiters in the file to indicate the end of one row of data and the start of the next. Rows are not on individual lines but run accross multiple lines. It would appear though that every distinct set of data starts with a 'code' that is always the 25 characters long. The text is variable however. Assuming i've read the contents of the file into the string myfile, how do i split my...
5
4358
by: AJA | last post by:
Hello I have problem with reading from XML when XML is to large. Program delare 1-n variables where is declaration but can no make more delarations than length 8000 :(( drop table tblBooksEx CREATE TABLE ( IDENTITY (1, 1) NOT NULL , COLLATE Polish_CI_AS NULL , CONSTRAINT PRIMARY KEY CLUSTERED
0
1055
by: KENNY L. CHEN | last post by:
I have a table with a CHAR column which stored a COBOL redefined record. I tried to retrieve part of the field from the column with Oracle substr function. Here is one of example: The SQL/result are shown below: SQL: select length(substr(MY_COLUMN,36,8)) str_length, dump(substr(MY_COLUMN,36,8)) INFO,
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.