+ Reply to Thread
Results 1 to 7 of 7

How to create functions in ASE 12.5

  1. How to create functions in ASE 12.5

    Hi my friends,

    I'm need to create a function to return the index of non-visual
    characters, I know I can do this by the function patindex(), but I need
    one to analize all for all characters at once. How can I create a
    function in ASE for this? Which syntax I use? Java or SQL?

    Thanks for the help.

  2. Re: How to create functions in ASE 12.5

    You can do this with java -- check out www.sypron.nl/udf.html .

    HTH,

    Rob V.
    -------------------------------------------------------------
    Rob Verschoor

    Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
    and Replication Server 12.5 / TeamSybase

    Author of Sybase books (order online at www.sypron.nl/shop):
    "Tips, Tricks & Recipes for Sybase ASE"
    "The Complete Sybase Replication Server Quick Reference Guide"
    "The Complete Sybase ASE Quick Reference Guide"

    mailto:rob@YOUR.SPAM.sypron.nl.NOT.FOR.ME
    http://www.sypron.nl
    Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
    -------------------------------------------------------------

    "Tiago PB" wrote in message
    news:44a538cd$1@forums-1-dub...
    > Hi my friends,
    >
    > I'm need to create a function to return the index of non-visual
    > characters, I know I can do this by the function patindex(), but I need
    > one to analize all for all characters at once. How can I create a
    > function in ASE for this? Which syntax I use? Java or SQL?
    >
    > Thanks for the help.




  3. Re: How to create functions in ASE 12.5

    There's no other way than using Java?

    Tiago PB wrote:
    > Hi my friends,
    >
    > I'm need to create a function to return the index of non-visual
    > characters, I know I can do this by the function patindex(), but I need
    > one to analize all for all characters at once. How can I create a
    > function in ASE for this? Which syntax I use? Java or SQL?
    >
    > Thanks for the help.


  4. Re: How to create functions in ASE 12.5

    Currently, no.

    Rob V.


    "Tiago PB" wrote in message
    news:44a54ce9@forums-1-dub...
    > There's no other way than using Java?
    >
    > Tiago PB wrote:
    > > Hi my friends,
    > >
    > > I'm need to create a function to return the index of non-visual
    > > characters, I know I can do this by the function patindex(), but I need
    > > one to analize all for all characters at once. How can I create a
    > > function in ASE for this? Which syntax I use? Java or SQL?
    > >
    > > Thanks for the help.




  5. Re: How to create functions in ASE 12.5

    Well, I'll this way so, thanks for the help Rob!

    Rob Verschoor wrote:
    > Currently, no.
    >
    > Rob V.
    >
    >
    > "Tiago PB" wrote in message
    > news:44a54ce9@forums-1-dub...
    >> There's no other way than using Java?
    >>
    >> Tiago PB wrote:
    >>> Hi my friends,
    >>>
    >>> I'm need to create a function to return the index of non-visual
    >>> characters, I know I can do this by the function patindex(), but I need
    >>> one to analize all for all characters at once. How can I create a
    >>> function in ASE for this? Which syntax I use? Java or SQL?
    >>>
    >>> Thanks for the help.

    >
    >


  6. Re: How to create functions in ASE 12.5

    Depends on how you define "non-visual" characters. Is there an ascii value
    range that you want to look for?

    "Tiago PB" wrote in message
    news:44a538cd$1@forums-1-dub...
    > Hi my friends,
    >
    > I'm need to create a function to return the index of non-visual
    > characters, I know I can do this by the function patindex(), but I need
    > one to analize all for all characters at once. How can I create a
    > function in ASE for this? Which syntax I use? Java or SQL?
    >
    > Thanks for the help.




  7. Re: How to create functions in ASE 12.5

    Well, patindex can analize all. Just tell it what you
    consider to be a visual character. e.g.

    This will take char(9) to be a visual character and char(10)
    not

    1> select
    patindex('%[^A-Za-z0-9'+char(9)+']%','aa'+char(9)+'bb'+char(10)+'cc')
    2> go

    -----------
    6

    (1 row affected)


    > Hi my friends,
    >
    > I'm need to create a function to return the index of
    > non-visual characters, I know I can do this by the
    > function patindex(), but I need one to analize all for
    > all characters at once. How can I create a function in
    > ASE for this? Which syntax I use? Java or SQL?
    >
    > Thanks for the help.


+ Reply to Thread