Solved

How to call a sql function from different database

Posted on 2006-11-29
2
242 Views
Last Modified: 2010-03-19
Following statment works
use DB1
Go
   select dbo..functionMonth(getdate())

Following statment failed
use DB2
Go
    select DB1...dbo...functionMonth(getdate())
0
Comment
Question by:Bharat Guru
2 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18040893
>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
 
LVL 20

Accepted Solution

by:
Sirees earned 25 total points
ID: 18040904
Can you try this

use DB2
Go
 select DB1.dbo.functionMonth(getdate())
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now