Skip to Content
author's profile photo Former Member
Former Member

stored procedures

Hi to all:

my question this time is, if I can use a stored procedures using the SQL syntaxis to execute a Query with formated search in SBO 6.5.

Thanks all for your help

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 04, 2004 at 08:23 AM

    Hi Natalie,

    yes you can use stored procedures and functions from formatted search.

    An example that I've used myself: In Denmark we have another format for numbers than in the US. In the US they write 1,000.00 where in Denmark we write 1.000,00. That means that I was not able to convert the numbers I take from fields in SBO to floats so I can do calculations on them.

    To work around that problem I created my own version of cast as follows:

    create function mycast (@NumString nvarchar(50))

    returns float

    as

    begin

    return ( select cast (replace (replace (@NumString,'.',''),',','.') as float) )

    end

    This is created in the database once and for all. After that I can use it everywhere including in a formatted search. as seen below

    select dbo.mycast('123.456,78') + dbo.mycast('1.234,56')

    select dbo.mycast($[$34.0.0]) + dbo.mycast($[£38.0.0])

    Hope this helps

    Rgds

    Jesper Carstensen

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.