How do I get unmatched data between an Excel and SQL data table in Blue Prism?
up vote
-1
down vote
favorite
sample data there is 1 unmatched record in excel which i need to get as my output.
blueprism
add a comment |
up vote
-1
down vote
favorite
sample data there is 1 unmatched record in excel which i need to get as my output.
blueprism
1
Can you share more info? Do I understand it that you have two collections and you would like to get the ones that are in one table but not the other? What have you tried so far?
– Marek Stejskal
Nov 7 at 9:26
I need to get unmatched records from both collections, one source is Excel Data and other source is DB2OLEDB table data, both have the same columns but sometimes some columns data do not match to other, so i need to compare both sources data and send the unmacthed data in to excel sheet. added sample data image pls let me know if you need more details.
– madhu
Nov 8 at 19:32
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
sample data there is 1 unmatched record in excel which i need to get as my output.
blueprism
sample data there is 1 unmatched record in excel which i need to get as my output.
blueprism
blueprism
edited Nov 8 at 19:46
asked Nov 7 at 5:10
madhu
43
43
1
Can you share more info? Do I understand it that you have two collections and you would like to get the ones that are in one table but not the other? What have you tried so far?
– Marek Stejskal
Nov 7 at 9:26
I need to get unmatched records from both collections, one source is Excel Data and other source is DB2OLEDB table data, both have the same columns but sometimes some columns data do not match to other, so i need to compare both sources data and send the unmacthed data in to excel sheet. added sample data image pls let me know if you need more details.
– madhu
Nov 8 at 19:32
add a comment |
1
Can you share more info? Do I understand it that you have two collections and you would like to get the ones that are in one table but not the other? What have you tried so far?
– Marek Stejskal
Nov 7 at 9:26
I need to get unmatched records from both collections, one source is Excel Data and other source is DB2OLEDB table data, both have the same columns but sometimes some columns data do not match to other, so i need to compare both sources data and send the unmacthed data in to excel sheet. added sample data image pls let me know if you need more details.
– madhu
Nov 8 at 19:32
1
1
Can you share more info? Do I understand it that you have two collections and you would like to get the ones that are in one table but not the other? What have you tried so far?
– Marek Stejskal
Nov 7 at 9:26
Can you share more info? Do I understand it that you have two collections and you would like to get the ones that are in one table but not the other? What have you tried so far?
– Marek Stejskal
Nov 7 at 9:26
I need to get unmatched records from both collections, one source is Excel Data and other source is DB2OLEDB table data, both have the same columns but sometimes some columns data do not match to other, so i need to compare both sources data and send the unmacthed data in to excel sheet. added sample data image pls let me know if you need more details.
– madhu
Nov 8 at 19:32
I need to get unmatched records from both collections, one source is Excel Data and other source is DB2OLEDB table data, both have the same columns but sometimes some columns data do not match to other, so i need to compare both sources data and send the unmacthed data in to excel sheet. added sample data image pls let me know if you need more details.
– madhu
Nov 8 at 19:32
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
There are two options I can think of from the top of my head:
- Simple way
- Coding way
Doing it the simple way would be looping through the larger of the two collections and using the Filter Collection
from Utilities - Collection manipulation
on the other collection to see if a row with the same values as in the primary collection is in the other collection. This approach will work well, but it will require an unnecessary amount of stages, more time to build and the performance will suffer in case you have large collections.
Doing it the coding way would mean using either VB.NET or C# and using the Except
command. There are several examples even here on Stack Overflow (example). The drawback of this solution is that some background knowledge of .NET is required. You would need to add additional DLL references (System.Data.DataSetExtensions.dll
and System.Core.dll
) and namespaces (System.Linq
).
The C# code then would be:
colOut = col1.AsEnumerable().Except(col2.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();
...where col1 and col2 are input collections and colOut is an output collection.
Mind you that you that the code above will find you rows from col1 that are not present in col2, to find rows from col2 that are not present in col1 you will either have to switch the inputs and run it again or tweak the code some more.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
There are two options I can think of from the top of my head:
- Simple way
- Coding way
Doing it the simple way would be looping through the larger of the two collections and using the Filter Collection
from Utilities - Collection manipulation
on the other collection to see if a row with the same values as in the primary collection is in the other collection. This approach will work well, but it will require an unnecessary amount of stages, more time to build and the performance will suffer in case you have large collections.
Doing it the coding way would mean using either VB.NET or C# and using the Except
command. There are several examples even here on Stack Overflow (example). The drawback of this solution is that some background knowledge of .NET is required. You would need to add additional DLL references (System.Data.DataSetExtensions.dll
and System.Core.dll
) and namespaces (System.Linq
).
The C# code then would be:
colOut = col1.AsEnumerable().Except(col2.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();
...where col1 and col2 are input collections and colOut is an output collection.
Mind you that you that the code above will find you rows from col1 that are not present in col2, to find rows from col2 that are not present in col1 you will either have to switch the inputs and run it again or tweak the code some more.
add a comment |
up vote
0
down vote
There are two options I can think of from the top of my head:
- Simple way
- Coding way
Doing it the simple way would be looping through the larger of the two collections and using the Filter Collection
from Utilities - Collection manipulation
on the other collection to see if a row with the same values as in the primary collection is in the other collection. This approach will work well, but it will require an unnecessary amount of stages, more time to build and the performance will suffer in case you have large collections.
Doing it the coding way would mean using either VB.NET or C# and using the Except
command. There are several examples even here on Stack Overflow (example). The drawback of this solution is that some background knowledge of .NET is required. You would need to add additional DLL references (System.Data.DataSetExtensions.dll
and System.Core.dll
) and namespaces (System.Linq
).
The C# code then would be:
colOut = col1.AsEnumerable().Except(col2.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();
...where col1 and col2 are input collections and colOut is an output collection.
Mind you that you that the code above will find you rows from col1 that are not present in col2, to find rows from col2 that are not present in col1 you will either have to switch the inputs and run it again or tweak the code some more.
add a comment |
up vote
0
down vote
up vote
0
down vote
There are two options I can think of from the top of my head:
- Simple way
- Coding way
Doing it the simple way would be looping through the larger of the two collections and using the Filter Collection
from Utilities - Collection manipulation
on the other collection to see if a row with the same values as in the primary collection is in the other collection. This approach will work well, but it will require an unnecessary amount of stages, more time to build and the performance will suffer in case you have large collections.
Doing it the coding way would mean using either VB.NET or C# and using the Except
command. There are several examples even here on Stack Overflow (example). The drawback of this solution is that some background knowledge of .NET is required. You would need to add additional DLL references (System.Data.DataSetExtensions.dll
and System.Core.dll
) and namespaces (System.Linq
).
The C# code then would be:
colOut = col1.AsEnumerable().Except(col2.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();
...where col1 and col2 are input collections and colOut is an output collection.
Mind you that you that the code above will find you rows from col1 that are not present in col2, to find rows from col2 that are not present in col1 you will either have to switch the inputs and run it again or tweak the code some more.
There are two options I can think of from the top of my head:
- Simple way
- Coding way
Doing it the simple way would be looping through the larger of the two collections and using the Filter Collection
from Utilities - Collection manipulation
on the other collection to see if a row with the same values as in the primary collection is in the other collection. This approach will work well, but it will require an unnecessary amount of stages, more time to build and the performance will suffer in case you have large collections.
Doing it the coding way would mean using either VB.NET or C# and using the Except
command. There are several examples even here on Stack Overflow (example). The drawback of this solution is that some background knowledge of .NET is required. You would need to add additional DLL references (System.Data.DataSetExtensions.dll
and System.Core.dll
) and namespaces (System.Linq
).
The C# code then would be:
colOut = col1.AsEnumerable().Except(col2.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();
...where col1 and col2 are input collections and colOut is an output collection.
Mind you that you that the code above will find you rows from col1 that are not present in col2, to find rows from col2 that are not present in col1 you will either have to switch the inputs and run it again or tweak the code some more.
answered Nov 8 at 21:49
Marek Stejskal
1,6941221
1,6941221
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53183872%2fhow-do-i-get-unmatched-data-between-an-excel-and-sql-data-table-in-blue-prism%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Can you share more info? Do I understand it that you have two collections and you would like to get the ones that are in one table but not the other? What have you tried so far?
– Marek Stejskal
Nov 7 at 9:26
I need to get unmatched records from both collections, one source is Excel Data and other source is DB2OLEDB table data, both have the same columns but sometimes some columns data do not match to other, so i need to compare both sources data and send the unmacthed data in to excel sheet. added sample data image pls let me know if you need more details.
– madhu
Nov 8 at 19:32