How to pass Data Source as a parameter

kmiao2kmiao2 Posts: 2
edited March 3, 2017 12:37AM in SQL Data Generator
We have a column [IdCategory] across many tables with a fixed pre-fix, I would like to create a generic Generator, which can change this pre-fix to something else while generating this [IdCategory] Column by using 'SQL Statement' Generator. How do I pass tablename ( existing Data Source ) as a parameter.

For example,
IdCategory was: Test:Name , Test:Company, Test:Department

After change:
IdCategory will be : Km:Name, Km:Company, Km:Department

Many thanks,
km

Comments

  • Hey km,

    Thanks for contacting us!
    If you are using the SQL Statement Generic generator it is just writing a Select statement against the target database- so i'm not sure how you would write a script that was general enough to be used in multiple columns where you need the target tablename to be different - you cannot pass the target table.

    Also note that this tool is used for mixing up and generating data - it does not do a great job of just altering a specific subset of data - if you choose a table to generate into - it will delete everything within it and insert a bunch of mixed up/generated data.

    I hope that helps!
    Andrew Pierce
    Technical Sales Engineer
    Redgate Software
Sign In or Register to comment.