Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
juanetes
Starting Member
8 Posts |
Posted - 2011-01-26 : 19:34:54
|
| Hi. I have a function in SQL that applies some algorithm to compare two strings (two fields that contains strings). Now I have a better algorithm in C++ to compare two strings (which is faster and complex because use data structures from STL like set and map). I need to apply this C++ algorithm instead of that SQL function. I thought that the best way is to use C++ to get data from MS SQL server and then apply the algorithm. However maybe there is a better and easier choice. Can I make some call to an external C++ function from SQL function or from SQL stored procedure? What do you suggest me to do?Maybe it is a very basic question but I couldn't find an answer.Thanks in advance! |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2011-01-26 : 21:59:03
|
if you can implement your algorithm in C# then you could use a CLR proc or function for this.Otherwise, you can call into native code from SQL using so-called extended stored procedures, which is more clunky than the CLR option. elsasoft.org |
 |
|
|
|
|
|