Need syntax for include with wild card
NDUCKSTE
Posts: 22
I'm trying to figure out the SQLCompare syntax for including all the objects that begin with a certain prefix (i.e. Log*).
I've tried the following to no avail:
/Include:table:Log
/Include:table:Log*
/Include:table:^Log
/Include:table:^Log*
/Include:table:^\[Log*
...
Thanks in advance.
Nick
I've tried the following to no avail:
/Include:table:Log
/Include:table:Log*
/Include:table:^Log
/Include:table:^Log*
/Include:table:^\[Log*
...
Thanks in advance.
Nick
Comments
You don't need to do anything special to include all tables containing Log.
The first example (/Include:table:Log) should include tables:
Log
LogA
LogB
New_Log
If you only want a specific table, i.e. 'LogTest' you will need to use:
/Include:table:\[LogTest\]
If are looking to only include tables with a certain schema/owner, i.e.
Log.Table_A
Log.Table_B
Then you will need to add a filter for the 'Log' schema/owner to the project. You can create a filter through the UI, and then reference it through the command line using /filter:
I hope this is helpful.
I need one more clarification.
/Include:table:Log) brings back the following tables:
Log
LogA
LogB
New_Log
What if I just wanted those that begin with Log*, i.e. omitting New_Log?
Do you have any documentation on how to use the /filter: switch?
Thanks,
Nick
However, that hardcodes and XML filter file with specific search criteria. I want my criteria parameterized, not hardcoded. In other words, I can't create a filter file for a every different flavor of a parameter I might encounter -- I simply don't know what all the parameters are in advance.
Part of my confusion is why I would need the /filter: statement at all. The documentation on include/exclude states that the parameters for these switches are regular expressions:
/include:<object type>:<regular expression>
Thanks in advance,
Nick
To include objects that begin with a specified string, include the SQL identifier, for instance \[log will match Log, Logfile, Log_Name, but not MyLog or MyLogFileName.
All you really need to do for the CL, is to build a custom filter through the UI, save it, and then reference it using /filter e.g.
/filter:"D:\SQL Compare filter\myFilter.scpf"
Why don't update this information on SQLCompare "Switches used in the command line" help.
Please update the same.
Naras.
Thanks
Naras.
Naras.
This will be updated shortly; we forgot to update the documentation with the new feature when SQL Compare 8.1 was released.