Create PROCEDURE [dbo].[AccountInvoice1] AS BEGIN Declare @fnmodule varchar(100) SET NOCOUNT ON; use databaeA select @fnmodule=DomesticFlag from Booking where ClientID='044' use databaseB SELECT FNMDId from GenFunction where FNMODULE=@fnModule END
select @fnmodule=DomesticFlag from [DBA].[dbo].Booking where ClientID='044' select count(*) from [DBB].[dbo].Booking where DomesticFlag = @frmmodule //Now check for count and do appropriate processing.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)