Re: Why use Pro*C for spooling result sets to flat files when you can do the same thing in SQL*Plus?

  • From: Bill Myers <bwmyers@xxxxxxxxx>
  • To: Steve Baldwin <stbaldwin@xxxxxxxxxxxxxxxx>
  • Date: Thu, 2 Sep 2010 01:48:53 +0000

Thanks Steve, I overlooked the obvious with that one (the math looked off
which took precedence I suppose).

On Thu, Sep 2, 2010 at 12:17 AM, Steve Baldwin
<stbaldwin@xxxxxxxxxxxxxxxx>wrote:

> The problem in this case is that the data type of 'id || id' is VARCHAR2
> and with Oracle, the maximum size of a VARCHAR2 column is 4000 chars.
>
> Steve
>
>
> On Thu, Sep 2, 2010 at 10:06 AM, Bill Myers <bwmyers@xxxxxxxxx> wrote:
>
>> "id||id" is 4000 chars concatenated with another 4000 chars, so shouldn't
>> linesize=8000 in that case?
>>
>>
>> On Wed, Sep 1, 2010 at 4:40 PM, Michael Dinh <mdinh@xxxxxxxxx> wrote:
>>
>>>  Here is a simple test case.  May be I am doing something wrong, but was
>>> not able to figure it out.
>>>
>>>
>>>
>>> create table t1(id varchar2(4000));
>>>
>>> insert into t1 values (lpad('a', 4000, 'b' ));
>>>
>>>
>>>
>>> set linesize 4000
>>>
>>>
>>>
>>> select id||id from t1;
>>>
>>> ERROR at line 1:
>>>
>>> ORA-01489: result of string concatenation is too long
>>>
>>> ---------------------------------------------------------------------------------------
> This email is intended solely for the use of the addressee and may
> contain information that is confidential, proprietary, or both.
> If you receive this email in error please immediately notify the
> sender and delete the email.
> ---------------------------------------------------------------------------------------
>
>
>

Other related posts: