Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C Question - printing varchar
Kareem Nutt wrote:
> I have the following:
>
> varchar name[21];
> .... select statement puts value into name ...
> .....
> name.arr[name.len] = '\0';
> printf ("name is %s.\n", name.arr);
>
> Example of what I get when I do this I get:
> "name is bob."
>
> What I want is to have all the extra spaces printed out as well:
> "name is bob."
>
> Anyone know how to do this?
You could declare the host variable as char instead of varchar or read up on printf's format string syntax.
btw. please dont multipost.
/Bent
Received on Fri Oct 15 2004 - 00:00:07 CDT
![]() |
![]() |