dbTalk Databases Forums  

dynamic sql substr length strange value (aix/hp differences?)

comp.databases.oracle comp.databases.oracle


Discuss dynamic sql substr length strange value (aix/hp differences?) in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ari
 
Posts: n/a

Default dynamic sql substr length strange value (aix/hp differences?) - 07-29-2004 , 10:55 AM






we have a strange problem with oracle dynamic sql method 4.
when selecting a substr we expect to, and normally, receive from
oracle in the describe select list (SELDSC) the length of the
substring. For example, when performing "select substr(table_name,1,5)
from cat" we expect to receive the length of 5. This indeed happens on
our aix machine, but on a customer's hp machine we receive the length
30 (the length of table_name.) We have also noticed that within
sqlplus, if we perform "substr(table_name,1,5) from cat" the title on
the aix machine is "SUBST" while on the hp machine it is
"substr(table_name,1,5)" padded to 30 characters. Does anyone have an
explanation for this bizarre behavior?

Reply With Quote
  #2  
Old   
Jim Kennedy
 
Posts: n/a

Default Re: dynamic sql substr length strange value (aix/hp differences?) - 07-29-2004 , 10:00 PM







"Ari" <unikoski (AT) yahoo (DOT) com> wrote

Quote:
we have a strange problem with oracle dynamic sql method 4.
when selecting a substr we expect to, and normally, receive from
oracle in the describe select list (SELDSC) the length of the
substring. For example, when performing "select substr(table_name,1,5)
from cat" we expect to receive the length of 5. This indeed happens on
our aix machine, but on a customer's hp machine we receive the length
30 (the length of table_name.) We have also noticed that within
sqlplus, if we perform "substr(table_name,1,5) from cat" the title on
the aix machine is "SUBST" while on the hp machine it is
"substr(table_name,1,5)" padded to 30 characters. Does anyone have an
explanation for this bizarre behavior?
One is a varchar and the other is a char column.
Jim




Reply With Quote
  #3  
Old   
Marat
 
Posts: n/a

Default Re: dynamic sql substr length strange value (aix/hp differences?) - 08-01-2004 , 06:01 AM



"Jim Kennedy" <kennedy-downwithspammersfamily (AT) attbi (DOT) net> wrote

Quote:
"Ari" <unikoski (AT) yahoo (DOT) com> wrote in message
news:b4724890.0407290755.13031588 (AT) posting (DOT) google.com...
we have a strange problem with oracle dynamic sql method 4.
when selecting a substr we expect to, and normally, receive from
oracle in the describe select list (SELDSC) the length of the
substring. For example, when performing "select substr(table_name,1,5)
from cat" we expect to receive the length of 5. This indeed happens on
our aix machine, but on a customer's hp machine we receive the length
30 (the length of table_name.) We have also noticed that within
sqlplus, if we perform "substr(table_name,1,5) from cat" the title on
the aix machine is "SUBST" while on the hp machine it is
"substr(table_name,1,5)" padded to 30 characters. Does anyone have an
explanation for this bizarre behavior?
One is a varchar and the other is a char column.
Jim
How do you mean ?
When we ran the same application on HP and AIX, we got a certain value
on one and another one on the other. Besides, cat.table_name on both
machine should be the same.

Thanks.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.