Thread: help

help

From
arun kv
Date:
hello,
       maybe wrong question to wrong site.  i have to use soap in php to
carry out a task.what all i need to do it.what all i shud download and
install and how to start.
     pls somebody help
             thanks
                  Arun


Re: help

From
Bruno Wolff III
Date:
On Wed, Jul 02, 2003 at 16:51:11 -0400,
  yanping huang <yanping@altimate.ca> wrote:
> Hi,
> I am learning postgreSQL. Why I can't get a correct result using LPAD?

You are getting a correct result. If you review the documentation on LPAD
you will see that the length is the total length of the resulting string,
not the number of times to repeat the fill string.

>
> select LPAD('Hello',3);   not -> '   Hello'
>  lpad
> ------
>  Hel
>
> select LPAD('ello',3,'H'); not -> 'HHHello'
>  lpad
> ------
>  ell
>
> select LPAD('hen', 1, '^');
>  lpad
> ------
>  h
>
>
> How can I put a '^' befor a variable of VARCHAR type in a function?
>
> Yanping
> --
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org

Re: help

From
"Andrew J. Kopciuch"
Date:
> How can I put a '^' befor a variable of VARCHAR type in a function?
>

Is this what you are looking for ... the concatentation operator?

select '^' || 'sometext'::varchar;



If you are asking about doing that in the function call :

select myfunction( '^' || var);



Andy