Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. User defined function within another User Defined function

User defined function within another User Defined function

Scheduled Pinned Locked Moved Database
databasequestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VK Cadec
    wrote on last edited by
    #1

    Hi - As the subject lines suggests - can we do this in SQL 2005? suppose I have a function_A - does certain calculations. CREATE another_function_B (@driver int) RETURNS int AS BEGIN declare @output as int -- checks some certain type of conditions and then executes function_A select @output = dbo.function_A(@driver) return @output END

    C E 2 Replies Last reply
    0
    • V VK Cadec

      Hi - As the subject lines suggests - can we do this in SQL 2005? suppose I have a function_A - does certain calculations. CREATE another_function_B (@driver int) RETURNS int AS BEGIN declare @output as int -- checks some certain type of conditions and then executes function_A select @output = dbo.function_A(@driver) return @output END

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      I don't see why not. Why didn't you just try it and see?


      Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

      V 1 Reply Last reply
      0
      • C Colin Angus Mackay

        I don't see why not. Why didn't you just try it and see?


        Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

        V Offline
        V Offline
        VK Cadec
        wrote on last edited by
        #3

        I did - it didn't get any results, which it should have. that is why decided to post a message. I tried to debug the 'function' by using print statements but looks like that doesn't work. How could we write some debug statement?

        1 Reply Last reply
        0
        • V VK Cadec

          Hi - As the subject lines suggests - can we do this in SQL 2005? suppose I have a function_A - does certain calculations. CREATE another_function_B (@driver int) RETURNS int AS BEGIN declare @output as int -- checks some certain type of conditions and then executes function_A select @output = dbo.function_A(@driver) return @output END

          E Offline
          E Offline
          ednrgc
          wrote on last edited by
          #4

          Verify each item outside the UDF. That way you will see if it actually returns data.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups