Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Compare two Datasets
Topic Summary:
Created On: 05/01/2013 02:00 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 05/01/2013 02:00 PM
User is offline View Users Profile Print this message

Author Icon
ChrisThomas
Apprentice (20-49)

Posts: 41
Joined: 08/13/2012

Hi, Is there a way to easily compare two datasets within Automate?

Both datasets have a common field but i need to see if dataset 1 has records in dataset 2.

 

Thanks

Chris



 Category Survey
 05/01/2013 02:34 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Chris,
there is no ready made action to do so.
looping ds1 and searching ds2each time will be necessary.
For performance reasons, it would be better made in basic script.

Unless the datasets result from two SQL queries that could be combined to provide directly the result you need.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 05/02/2013 06:44 AM
User is offline View Users Profile Print this message

Author Icon
ChrisThomas
Apprentice (20-49)

Posts: 41
Joined: 08/13/2012

Thanks, i'll push the compare to SQL.  We have many records and looping through them seems like it would take forever. (from past experience anyways).



 Category Survey
 05/02/2013 06:47 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

You're welcome, Chris. I fully support your final decision.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 06/14/2013 02:00 PM
User is offline View Users Profile Print this message

Author Icon
NC_ITGuy
n00b (>6 posts)

Posts: 3
Joined: 03/07/2007

You mentioned compaing the two by combining the SQL queries. Can this be done if you have two different SQL connections? My scenario is that I have one table in a database sitting on an SQL 2000 server that need to compare to a table in a database sitting on an SQL 2008 server. What I'm currently doing is reading in the table into a dataset and then looping that dataset making an SQL call to the other table with the where clause to see if there is a matching record. I guess a more efficient way would be to read in both tables into a dataset and compare, but either way seems to be slow. Any suggestions?

 Category Survey
 06/14/2013 11:41 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

NC,
I don't know of a means to SQL query simultaneously with two different connections.
And looping the two datasets is lengthy in using Automate loops. But could be substantially faster in basic script.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 2413 guests browsing this forum, which makes a total of 2413 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog