• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

How to call a sql function from different database

Following statment works
use DB1
Go
   select dbo..functionMonth(getdate())

Following statment failed
use DB2
Go
    select DB1...dbo...functionMonth(getdate())
0
Bharat Guru
Asked:
Bharat Guru
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Following statment failed
what error message?

now, how comes you have 2 resp 3 dots in between the database, dbo and function names? typo during posting?

0
 
SireesCommented:
Can you try this

use DB2
Go
 select DB1.dbo.functionMonth(getdate())
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now