dnlnln / generate-sql-merge

Generate SQL MERGE statements with Table data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make sure you have SELECT permission on that table or view.

stfarm opened this issue · comments

I am sure it's just a user error, but I can't figure out what I am doing wrong. This would be the perfect script.

I want to use it for a table I have (TRAVEL.dbo.AIRLINES) for example.
I execute (I am logged in as sa):
EXEC sp_generate_merge @schema = 'TRAVEL', @table_name ='dbo.AIRLINES'

Then I get this error.

Msg 50000, Level 16, State 1, Procedure sp_generate_merge, Line 216 [Batch Start Line 0]
User table or view not found.
Make sure you have SELECT permission on that table or view.

I would appreciate any help.

How about this

EXEC [Travel].[dbo].sp_generate_merge @schema = 'dbo', @table_name ='AIRLINES'

Notice the difference in @schema and @table_name params.

So cool, thank you for the quick reply, that worked great!!