I have a MSSQL database to deploy some changes to but I need to refer objects from another MSSQL database. I have been deploying DB changes with SSDT and refer objects from another DB i.e., “db123” as shown below and use dacpacs.
CREATE VIEW [dbo].[vSurvey_1]
SELECT a.clinic_id, Vote_ScoreAsText = a.Vote, Vote_DateTime = a.DateTime, a.DType FROM
/*, Testing rps_id = rps.id, pps_id = pps.id */
, rank = rank() OVER (partition BY rps.ID ORDER BY pps.Created desc)
FROM Results_Survey rps WITH (nolock)
INNER JOIN Process_Survey pps WITH (nolock)
ON pps.PhoneNumber = rps.MobileNumber
AND [$(db123)].dbo.TrimTime(pps.Created) <= [$(db123)].dbo.TrimTime(rps.DateTime)
WHERE a.rank = 1
As we refer objects from the “db123” database in the above view while deploying changes using SSDT, do we have an option to do the same with Liquibase or some work around to refer objects from “db123” in our current database and avoid data duplication?
Please let me know! Thank You!!!