Red Gate forums :: View topic - Exclude columns from multiple tables using XML config?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

Exclude columns from multiple tables using XML config?

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
freecell1



Joined: 13 Mar 2012
Posts: 21

PostPosted: Fri Apr 05, 2013 9:35 pm    Post subject: Exclude columns from multiple tables using XML config? Reply with quote

Hi -

I'm trying to compare two databases and want to exclude columns from multiple tables. I'm using an XML config file with the command line. For one table, this works:

Code:
   <excludecolumns>ResourceStringValue:DateModified</excludecolumns>


But for two columns (one from each of two tables), I can't figure it out. This causes an error:
Code:
   <excludecolumns>ResourceStringValue:DateModified</excludecolumns>
<excludecolumns>Site:Domain</excludecolumns>


as does this:

Code:
   <excludecolumns>ResourceStringValue:DateModified,Site:Domain</excludecolumns>


Thanks in advance.
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 938
Location: Red Gate Software

PostPosted: Mon Apr 08, 2013 11:51 am    Post subject: Reply with quote

Hi Freecell1,
Thank you for your forum post.

What version of SQL Data Compare are using?

Looking at the code you included, the syntax looks correct.

A support call has been created for you, the call reference is F0071476. Can you please send an e-mail to support@red-gate.com with details of the error you are experiencing and the full command line syntax you are using. Please include the above call reference in the subject field of the e-mail.

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
freecell1



Joined: 13 Mar 2012
Posts: 21

PostPosted: Mon Apr 08, 2013 3:55 pm    Post subject: Reply with quote

Version: Red Gate SQL Data Compare Command Line Utility V10.0.1.119

Thanks for creating the case. The compare is still not working correctly, although I did get the errors to stop. The syntax that worked better was using two XML tags (middle example above), but I added a RegEx end-of-line match to stop the error:

<excludecolumns>ResourceStringValue:DateModified</excludecolumns>
<excludecolumns>Site$:Domain</excludecolumns>

Without the $, I was getting an error like "no column 'Domain' in table SiteDisplayListItem". I have other tables whose names start with "Site" and the matches are treated as LIKE matches.

So the error code is fixed; however, the comparison still returns differences even if the excluded Domain column is the only one with changes.

Hope to figure this out ...
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 938
Location: Red Gate Software

PostPosted: Wed May 08, 2013 3:01 pm    Post subject: Reply with quote

Quick update in case other SQL Data Compare users wish to use the EXCLUDECOLUMNS switch in an XML argument file.

To exclude a column using the xml file, where you have two or more tables whose name includes the same string, the table name needs to be enclosed with the [ ] characters and escaped with the \ character. Using the example in this forum topic, where you need to exclude the column called "Domain" from a table called "Site" but have other tables whose table name includes the word or characters Site.

Using this syntax - <excludecolumns>\[Site\]:Domain</excludecolumns>

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group