Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Return value of tz_offset
Björn Wächter wrote:
> sybrandb wrote:
> > Björn Wächter wrote:
> >> I'm facing a problem if I try to append a string to the
> >> return value of tz_offset like this:
> >>
> >> select 'start' || tz_offset('+02:00') || 'end' test from dual
> >>
> >> TEST
> >> ---------------
> >> start+02:00
> >>
> >>
> >> But if I do this:
> >>
> >> select 'start' || substr(tz_offset('+02:00'),1,6) || 'end' test from dual
> >>
> >> TEST
> >> --------------
> >> start+02:00end
> >>
> >> it works fine.
> >>
> >>
> >> Any Ideas?
> >>
> >>
> >> Björn
> >
> > What is the outcome of
> > select dump(tz_offset('+02:00'))
> > from dual
> > /
> >
> > This should provide a hex dump of the result, so you can identify any
> > spurious trailing characters.
> >
> >
>
> >
>> Typ=1 Len=7: 43,48,50,58,48,48,0
> -----------------------------------
> >
> >
Or (hope not, because that would qualify it as a bug), as string
variables are \0 terminated in C, you simply get the raw contents of
the string variable back.
And as \0 is treated as NULL...
Time for a service request, I guess.
-- Sybrand Bakker Senior Oracle DBAReceived on Thu Sep 14 2006 - 06:26:24 CDT
![]() |
![]() |