Here's a problem
--------------------------------------------
set serveroutput on
DECLARE
CURSOR cur is select ed_no, length(ed_no) as len from li******@pubdb.world; BEGIN
for cur_rec in cur
loop
DBMS_OUTPUT.PUT_Line
('>'||cur_rec.ed_no||'<'||to_char(cur_rec.len) );
end loop;
end;
/
-------------------------------------------
this returns ABC <3 XYZ <3
....
i.e. result has correct value plus six trailing spaces
Column ed_no is CHAR(3)
I have the same problem with all CHAR columns in all tables. The
column length is tripled and trailing spaces added if I define the
cursor through the database link.
However, if I login to that database directly and get rid of
"@pubdb.world" in cursor definition, everything works fine and the
code returns
ABC<3 XYZ<3
....
Any comments, suggestions, workarounds, please... This bug (I believe
it's a bug) gonna ruin a month of my work :(((
I NEED the database link and I cannot employ RTRIM() everywhere.
Regards,
Dmitry 2 3074
Dmitry Duginov wrote: Here's a problem
-------------------------------------------- set serveroutput on DECLARE CURSOR cur is select ed_no, length(ed_no) as len from li******@pubdb.world; BEGIN for cur_rec in cur loop DBMS_OUTPUT.PUT_Line ('>'||cur_rec.ed_no||'<'||to_char(cur_rec.len) ); end loop; end; / -------------------------------------------
this returns
ABC <3 XYZ <3
...
i.e. result has correct value plus six trailing spaces
Column ed_no is CHAR(3)
I have the same problem with all CHAR columns in all tables. The column length is tripled and trailing spaces added if I define the cursor through the database link.
However, if I login to that database directly and get rid of "@pubdb.world" in cursor definition, everything works fine and the code returns
ABC<3 XYZ<3
...
Any comments, suggestions, workarounds, please... This bug (I believe it's a bug) gonna ruin a month of my work :(((
I NEED the database link and I cannot employ RTRIM() everywhere.
Regards, Dmitry
Could it be someone is concatenating empty fields?
If the programmer is believing these are varchars, concatenating
not initialized (NULL) fields make no difference.
CHAR fields start off with 3 spaces. CHAR(3)||CHAR(3)||CHAR(3) yields
9 characters
--
Regards, Frank van Bortel
Dmitry Duginov wrote: Here's a problem
-------------------------------------------- set serveroutput on DECLARE CURSOR cur is select ed_no, length(ed_no) as len from li******@pubdb.world; BEGIN for cur_rec in cur loop DBMS_OUTPUT.PUT_Line ('>'||cur_rec.ed_no||'<'||to_char(cur_rec.len) ); end loop; end; / -------------------------------------------
this returns
ABC <3 XYZ <3
...
i.e. result has correct value plus six trailing spaces
Column ed_no is CHAR(3)
I have the same problem with all CHAR columns in all tables. The column length is tripled and trailing spaces added if I define the cursor through the database link.
However, if I login to that database directly and get rid of "@pubdb.world" in cursor definition, everything works fine and the code returns
ABC<3 XYZ<3
...
Any comments, suggestions, workarounds, please... This bug (I believe it's a bug) gonna ruin a month of my work :(((
I NEED the database link and I cannot employ RTRIM() everywhere.
Regards, Dmitry
Could it be someone is concatenating empty fields?
If the programmer is believing these are varchars, concatenating
not initialized (NULL) fields make no difference.
CHAR fields start off with 3 spaces. CHAR(3)||CHAR(3)||CHAR(3) yields
9 characters
--
Regards, Frank van Bortel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bryan J Gudorf |
last post by:
PDO, an open source python module for interfacing with RDBMS (SQL
databases), has now reached 1.2.0! PDO provides an object oriented API,
similar to that of ADO or JDBC, to python developers. PDO...
|
by: Clay Beatty |
last post by:
When you create database diagrams in Enterprise Manager, the details
for constructing those diagrams is saved into the dtproperties table.
This table includes an image field which contains most of...
|
by: DarthMacgyver |
last post by:
Hello,
I recently wrote a survey application. Each question is very similar.
The first questions gives me a problem when there are multiple people
taking the survey (The Database connection...
|
by: Kums |
last post by:
What is the maximum permissible size of a database? Is there any limitation.
What is the maximum # of tablespace's allowed in a database?
Thanks for your response.
|
by: Alex Guryanow |
last post by:
Hi,
I have windows app written in Borland C++ Builder 5.0. Using ODBC
driver windows app connects to database on linux server. Database is
created with UNICODE encoding.
When pg-server is...
|
by: shsandeep |
last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development
database while it took 2 hours to load in a UAT database.
UAT db is partitioned.
Dev db is not partitioned.
the...
|
by: bartonc |
last post by:
With one small change to the view/control:
self.staticText3 = wx.StaticText(id=wxID_DBCONNECTDIALOGSTATICTEXT3,
label='ODBC Data Source Name', name='staticText3',...
|
by: Muchach |
last post by:
Hello,
Ok so what I've got going on is a form that is populated by pulling
info from database then using php do{} to create elements in form. I
have a text box in each table row for the user to...
|
by: Dmitry Duginov |
last post by:
Here's a problem
--------------------------------------------
set serveroutput on
DECLARE
CURSOR cur is select ed_no, length(ed_no) as len from
listtext@pubdb.world; BEGIN
for cur_rec in cur...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
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: 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...
| |