Showing posts with label ideas. Show all posts
Showing posts with label ideas. Show all posts

Wednesday, March 7, 2012

Need ideas on how to implement this...

I was thinking of a stored procedure that would select the top 20 rows in a
table and count words on a text column, returning the top 'n' words in
descending order of occurrence - not counting some common words (like on,
in, at, the, for, from, now, etc...)
Any ideas or routine ready to use?
Thanks in advance!
Mauricio Freitas, Microsoft MVP Mobile Devices
[url]http://www.gzone.co.nz[/url]
[url]http://www.gmac.com[/url]
Bluetooth guides: [url]http://www.gzone.co.nz/content.asp?contentid=449[/url]
Gzone Software Store: [url]http://www.gzone.co.nz/store[/url]Hi Mauricio
As a starting point you may want to check out something like the following
function:
http://www.sommarskog.se/arrays-in-sql.html#iterative
John
"Mauricio Freitas [MVP]" wrote:

> I was thinking of a stored procedure that would select the top 20 rows in
a
> table and count words on a text column, returning the top 'n' words in
> descending order of occurrence - not counting some common words (like on,
> in, at, the, for, from, now, etc...)
> Any ideas or routine ready to use?
> Thanks in advance!
>
> --
> Mauricio Freitas, Microsoft MVP Mobile Devices
> [url]http://www.gzone.co.nz[/url]
> [url]http://www.gmac.com[/url]
> bluetooth guides: [url]http://www.gzone.co.nz/content.asp?contentid=449[/url]
> Gzone Software Store: [url]http://www.gzone.co.nz/store[/url]
>
>
>|||Thanks John, will look at it :)
Mauricio Freitas, Microsoft MVP Mobile Devices
[url]http://www.gzone.co.nz[/url]
[url]http://www.gmac.com[/url]
Bluetooth guides: [url]http://www.gzone.co.nz/content.asp?contentid=449[/url]
Gzone Software Store: [url]http://www.gzone.co.nz/store[/url]
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:14F892B7-011C-4C2F-BF92-C5C258358811@.microsoft.com...
> Hi Mauricio
> As a starting point you may want to check out something like the following
> function:
> http://www.sommarskog.se/arrays-in-sql.html#iterative
> John
> "Mauricio Freitas [MVP]" wrote:
>

need ideas on how to approach this issue

----
--
All,
Need ideas on how to approach this I'm writing a c# program:
Have to compare account numbers in one table to account numbers in
another table and if they exist in the second table
The problem is the tables are in two separate databases (two different
physical places). One table in the ERP system and the other is in the
financial system.
table1 ERP system
table2 Financial system
1. Should I dump table 1 into dataset table, do the same with table
two. This way they are both in the same dataset then figure out how to
compare 1 to 2?
2. Do I dump table 1 into an array and iterate through the array
making sql calls (using a data reader) to see if the account numbers
exist in second table?
3. Put both tables in the arrays and hack away?
What do you consider a good approach or best practice?
Thanks in advance
RCThe fast way is to somehow get all the numbers in one location (on one
server). You can then execute a SQL statement that performs a JOIN or uses
WHERE EXISTS to determine which numbers match.
You could use DTS to get the data out. Or you could read them to a file
(from the one server) and then build insert statements to load the data into
a temp table (denoted by a # sign) on the other server -- against which you
would run the appropriate query.
Keith
"RC" <rick_castrejon@.email.com> wrote in message
news:1120869189.371998.244770@.g14g2000cwa.googlegroups.com...
> ----
--
> All,
> Need ideas on how to approach this I'm writing a c# program:
> Have to compare account numbers in one table to account numbers in
> another table and if they exist in the second table
> The problem is the tables are in two separate databases (two different
> physical places). One table in the ERP system and the other is in the
> financial system.
> table1 ERP system
> table2 Financial system
> 1. Should I dump table 1 into dataset table, do the same with table
> two. This way they are both in the same dataset then figure out how to
> compare 1 to 2?
> 2. Do I dump table 1 into an array and iterate through the array
> making sql calls (using a data reader) to see if the account numbers
> exist in second table?
> 3. Put both tables in the arrays and hack away?
> What do you consider a good approach or best practice?
> Thanks in advance
> RC
>

need ideas on how to approach this issue

All,
Need ideas on how to approach this I'm writing a c# program:
Have to compare account numbers in one table to account numbers in
another table and if they exist in the second table
The problem is the tables are in two separate databases (two different
physical places). One table in the ERP system and the other is in the
financial system.
table1 ERP system
table2 Financial system
1. Should I dump table 1 into dataset table, do the same with table
two. This way they are both in the same dataset then figure out how to
compare 1 to 2?
2. Do I dump table 1 into an array and iterate through the array
making sql calls (using a data reader) to see if the account numbers
exist in second table?
3. Put both tables in the arrays and hack away?
What do you consider a good approach or best practice?
Thanks in advance
RC
The fast way is to somehow get all the numbers in one location (on one
server). You can then execute a SQL statement that performs a JOIN or uses
WHERE EXISTS to determine which numbers match.
You could use DTS to get the data out. Or you could read them to a file
(from the one server) and then build insert statements to load the data into
a temp table (denoted by a # sign) on the other server -- against which you
would run the appropriate query.
Keith
"RC" <rick_castrejon@.email.com> wrote in message
news:1120869189.371998.244770@.g14g2000cwa.googlegr oups.com...
> ----
> All,
> Need ideas on how to approach this I'm writing a c# program:
> Have to compare account numbers in one table to account numbers in
> another table and if they exist in the second table
> The problem is the tables are in two separate databases (two different
> physical places). One table in the ERP system and the other is in the
> financial system.
> table1 ERP system
> table2 Financial system
> 1. Should I dump table 1 into dataset table, do the same with table
> two. This way they are both in the same dataset then figure out how to
> compare 1 to 2?
> 2. Do I dump table 1 into an array and iterate through the array
> making sql calls (using a data reader) to see if the account numbers
> exist in second table?
> 3. Put both tables in the arrays and hack away?
> What do you consider a good approach or best practice?
> Thanks in advance
> RC
>

need ideas on how to approach this issue

----
All,
Need ideas on how to approach this I'm writing a c# program:
Have to compare account numbers in one table to account numbers in
another table and if they exist in the second table
The problem is the tables are in two separate databases (two different
physical places). One table in the ERP system and the other is in the
financial system.
table1 ERP system
table2 Financial system
1. Should I dump table 1 into dataset table, do the same with table
two. This way they are both in the same dataset then figure out how to
compare 1 to 2?
2. Do I dump table 1 into an array and iterate through the array
making sql calls (using a data reader) to see if the account numbers
exist in second table?
3. Put both tables in the arrays and hack away?
What do you consider a good approach or best practice?
Thanks in advance
RCThe fast way is to somehow get all the numbers in one location (on one
server). You can then execute a SQL statement that performs a JOIN or uses
WHERE EXISTS to determine which numbers match.
You could use DTS to get the data out. Or you could read them to a file
(from the one server) and then build insert statements to load the data into
a temp table (denoted by a # sign) on the other server -- against which you
would run the appropriate query.
--
Keith
"RC" <rick_castrejon@.email.com> wrote in message
news:1120869189.371998.244770@.g14g2000cwa.googlegroups.com...
> ----
> All,
> Need ideas on how to approach this I'm writing a c# program:
> Have to compare account numbers in one table to account numbers in
> another table and if they exist in the second table
> The problem is the tables are in two separate databases (two different
> physical places). One table in the ERP system and the other is in the
> financial system.
> table1 ERP system
> table2 Financial system
> 1. Should I dump table 1 into dataset table, do the same with table
> two. This way they are both in the same dataset then figure out how to
> compare 1 to 2?
> 2. Do I dump table 1 into an array and iterate through the array
> making sql calls (using a data reader) to see if the account numbers
> exist in second table?
> 3. Put both tables in the arrays and hack away?
> What do you consider a good approach or best practice?
> Thanks in advance
> RC
>