Bulk upload data for alias feature in SQL Prompt

I have a list with table names and alias to be used for my development environment. I know SQL prompt have an option manually specify the alias for your tables. But it only allows adding one at a time. Is there a way I can bulk upload it from a csv or excel file?

Best Answer

  • Jessica RJessica R Posts: 1,319 Rose Gold 4

    Hello!

    Sorry to say there isn't a built-in way to do this. However, the alias settings get stored in %localappdata%\Red Gate\SQL Prompt 9\RedGate_SqlPrompt_Engine_EngineOptions.xml and it looks something like this:


    <UserDefinedAliases> 

    <Count>2</Count> 

    <UserDefinedAlias> 

    <ObjectName>MYOBJECT1</ObjectName> 

    <Alias>ALIAS1</Alias> 

    </UserDefinedAlias> 

    <UserDefinedAlias> 

    <ObjectName>MYOBJECT2</ObjectName> 

    <Alias>ALIAS2</Alias> 

    </UserDefinedAlias> 

    </UserDefinedAliases>


    You could create a program to take the table names and aliases from a csv or excel file and then insert it into the file in the format above.

    Hope that may help!

    However, if you'd like to see this as a built-in feature, could you please add a request for it to the uservoice forum: https://redgate.uservoice.com/forums/94413-sql-prompt

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.