469,890 Members | 2,164 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

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

Ari
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?
Jul 19 '05 #1
2 10187

"Ari" <un******@yahoo.com> wrote in message
news:b4**************************@posting.google.c om...
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
Jul 19 '05 #2
"Jim Kennedy" <ke****************************@attbi.net> wrote in message news:<wRiOc.180999$%_6.171660@attbi_s01>...
"Ari" <un******@yahoo.com> wrote in message
news:b4**************************@posting.google.c om...
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.
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by K | last post: by
7 posts views Thread by JavaScriptRocks | last post: by
4 posts views Thread by redoranda | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.