What are the challenges you face when working across database platforms? Take the survey
Options

Using sqlcmd (:R) inside migration script

Hi,

I'm trying to use a new stored procedure inside a migration script.
From what I understand, the sp is only created after all the migration scripts have been processed, thus it's not available in the migration script.

I tried to use SQLCMD :r command to import and run the script directly inside the migration script.
I have tried different path to import the script (full path, relative to the .sqlproj location) without success.

Here's the command I'm using:
:R "D:\I4\Analytics\Datawarehouse\ProligentDW\Programmable Objects\maintenance\Functions\fct_GetIndexVersion.sql"
or
:R ".\Programmable Objects\maintenance\Functions\fct_GetIndexVersion.sql"

Should it be possible to do? Is there another way of doing it?

regards,

Eric
Tagged:

Answers

Sign In or Register to comment.