Merge Several Lines Into 1 w/no duplicate words
Savatage
Member Posts: 7,142
Before I start on this I would like if anyone has any thoughts or if they've tryed it already.
What we are trying to do is (for example) take an item description.
1)HARRY HAIR CREME
2)HARRY HAIR GEL
3)HARRY FOOT CREME
Get a Result Like
HARRY HAIR CREME GEL FOOT
Where is took every word from the description and if it already existed then skip the word, if it's a new word add the word. Trying to create a type of meta tag for HARRY BRAND. I'm thinking finding the SPACE as a cut off point & starting point
Possible - Too Hard - NO WAY! any thoughts appreciated.
What we are trying to do is (for example) take an item description.
1)HARRY HAIR CREME
2)HARRY HAIR GEL
3)HARRY FOOT CREME
Get a Result Like
HARRY HAIR CREME GEL FOOT
Where is took every word from the description and if it already existed then skip the word, if it's a new word add the word. Trying to create a type of meta tag for HARRY BRAND. I'm thinking finding the SPACE as a cut off point & starting point
Possible - Too Hard - NO WAY! any thoughts appreciated.
0
Comments
-
Hi Harry,
thats no problem (some costs of hours and "mind lard"), but what is with delimiter like _ or / or - instead of space?
Is Harry-Ice-Cream one word or 3? And where you want to store the meta tags? a separate field with how many bytes? Or in a table ?
RegardsDo you make it right, it works too!0 -
Here's what I would do without doing too much programming:
1. Create a new table with 1 Code field and set it as primary key
2. Go through the streen and use STRPOS to find blank spaces, use COPYSTR to insert the values into the new table
3. When the looping is done and the values are inserted into the table, loop the new table and concatenate it into a string
4. Delete the table and repeat the process
Hope you get my drift.
Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
there are no dashes - every word is seperated by a space.
I guess I would create a new field called metatag size 250 text.
Hmm perhaps a new table Field 1 would be item number & key
then 50 other fields each field a different tag?
tag1
tag2
tag3
.
.
tag50
I guess 50 words :-k max would be enuf.??
which do you think would be easier???0 -
or two tables (only afast idea).
Table one Wordindex (is filled with every founded existing word)
ID (autoincr.) (PK)
Word (text 30) (FK)
Table 2 (Tags)
Code 250 (PK) <- This you fill with (used as filter) ID|ID|ID and so on.
So you can also filter to know which Tags exist.
Your Item Descriptions
1)HARRY HAIR CREME
2)HARRY HAIR GEL
3)HARRY FOOT CREME
4)OTTO
5)THE FILM
6)FILM BEST OF
Table Wordindex:
1 Harry
2 Hair
3 Creme
4 Gel
5 Foot
6 OTTO
7 THE
8 FILM
9 BEST
10 OF
Table Tags
1|2|3|4|5
6
7|8|9|10
Is this what you want?Do you make it right, it works too!0 -
-
and for what do you need this?
Create dynamic metatags for your website?Do you make it right, it works too!0 -
That was the request to help people find what they're looking for by brand. I haven't googled to see if there is some tool out there already that does this...paste a bunch of text and it pulls out key words.. :-k0
-
I think what you're talking about may be accomplished using Sharepoint. It's basically a intracompany seach engine.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
Not familiar with Sharepoint - thou I probably have a copy lying around on one of these 1000's of technet cd's.
Perhaps this weekend I'll have some time to check it out. I see the sharepoint website has some demos's too.0 -
Yeah, check that out. Let us know if it's what you need. That should save you some headaching development time.
Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I've never used them, but could Regular Expressions help you with this? Its implemented in the .Net Framework, and you could call some sort of assembly on a SQL backend using Ado.net....
As to how to do that not 100% sure, but regular expressions are all about "identifying strings of text of interest, such as particular characters, words, or patterns of characters"
??
Just a 2 pence input, I am sure there are people on here that know more about it than I do.
t0 -
There was an Add-On for Navision called Navi Marketing. Eventually it became what we now know as NAV CRM.
It had a function that did exactly this. I am pretty sure the function was kept in the early versions but then was removed. find an older version of Navision and pull the code from there. I think it might be in 2.01.
By the way it was used for two things, one was as a search tool, but more important as a duplicate clean up tool.David Singleton0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
