| Author |
Message |
gvsoft
Joined: 19 Jul 2012 Posts: 16
|
Posted: Wed Nov 21, 2012 3:16 am Post subject: Using ExcludeColumns switch correctly |
|
|
Hello,
I am using SQL Data Compare from the command line. I want to exclude a couple of columns on a table named, "Report". I am using the switch like this:
/excludecolumns:Report:CreatedTime,ModifiedTime
The problem is, since the table name is a regular expression, this matches several other tables with the word "Report" in them, resulting in errors that the specified columns do not exist. I have tried:
/excludecolumns:^^Report$:CreatedTime,ModifiedTime
/excludecolumns:^[Report^]:CreatedTime,ModifiedTime
. . . to no avail. This is ridiculous. What do I have to do to use ExcludeColumns correctly for this SIMPLE case? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Wed Nov 21, 2012 3:30 pm Post subject: |
|
|
/excludecolumns:^Report$:CreatedTime,ModifiedTime is the correct expression. (Begins with "Report" with nothing follwing "Report"). It looks like the command is going through correctly, but SQL Data Compare is not excluding the columns like it should. I am waiting for word from development about that. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
gvsoft
Joined: 19 Jul 2012 Posts: 16
|
Posted: Wed Nov 21, 2012 4:45 pm Post subject: |
|
|
Well that's a relief!
I should also point out that I am attempting to do this from a batch file. So I am pretty certain that need to escape the hat '^' character, hence my use of:
^^Report$
I eagerly await a reply. |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Wed Nov 28, 2012 3:53 pm Post subject: |
|
|
I got the list of reserved characters from MS-DOS documentation and that list does not include the hat ^. Hat is the escape character so AFAIK you don't need to escape it? At any rate I did test it on the command line.
But this is a different point altogether, the program is broken and using the correct syntax will not help you. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
gvsoft
Joined: 19 Jul 2012 Posts: 16
|
Posted: Wed Nov 28, 2012 4:22 pm Post subject: Re: |
|
|
| Brian Donahue wrote: |
I got the list of reserved characters from MS-DOS documentation and that list does not include the hat ^. Hat is the escape character so AFAIK you don't need to escape it? At any rate I did test it on the command line.
But this is a different point altogether, the program is broken and using the correct syntax will not help you. |
But because '^' is an escape character, it cannot be used by itself without being treated like an escape character. Therefore, to have it treated like a normal '^', it must be escaped as "^^".
Try this in a batch file:
@echo This is a hat: ^^
@echo This is an escape: ^
The first line will display a single '^'. The second will not. In fact, it will cause problems in the batch if left alone.
Can I expect a fix to the program any time soon? |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Wed Nov 28, 2012 5:45 pm Post subject: |
|
|
I think it's different in a batch file - like how sometimes you have to use %% instead of %... but I think this is a question best asked to an expert in a Microsoft forum. Like I said, I created a variety of tables with "Widget" in the Middle and "Widget" at the start of the name and it is picking the right table (begins with Widget) but he column stuff is being ignored, with or without the little hat. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|