Results 1 to 4 of 4

Thread: How to test a scalar function in sql managment studio?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Question How to test a scalar function in sql managment studio?

    Hello,

    I have a function that I need to test in management studio that is giving an error in my asp.net site. Is there any way to run in like a stored procedure so I can see what line it is failing on?

    Thanks,

    Warren

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,869

    Re: How to test a scalar function in sql managment studio?

    select dbo_scalarfunctionamehere(@paramerter1)

    Name:  EasyButton.jpg
Views: 35
Size:  66.7 KB

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    17,876

    Re: How to test a scalar function in sql managment studio?

    That is not so easy to setup. I believe that you can do line-by-line debugging of SQL objects - I've just never set it up myself. I usually rely on creating rows in DEBUG tables and such. With scalar func's that gets more difficult. Post the UDF here for us to look at...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,869

    Re: How to test a scalar function in sql managment studio?

    Hmmm... I see I mis-read that...
    In these cases I usually pull them apart... run them like I would a regular script, setting the parameters the old fashioned way.
    I almost suggested using SQL Profiler... but I'm not sure it goes into scalars


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width