Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 06:33 AM
Registered User
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Search and match record from two tabel

Help me, how to match record from tabel A and tabel B
my case:
1.Tabel A contain word like : computer, to, class etc in each record
2.Tabel B contain stop word like : and, to, i etc in each record
3.I want search each record in tabel A and match it with word in tabel B and delete word from tabel A
example:
word to in tabel A same with word to in tabel B,so word to tabel A will be delete

Please Help :D

 
Old May 15th, 2007, 11:51 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

For each record in A
Retrive the contents of the current A.
Split() is into an array arrA.
For each B
    Retreive the contents of the current B
    Split() is into an array arrB
    For each element of arrA, look for a match in arrB
    If there's a match take action
Next B

Next A

You can compare each element of arrA abainst all of the current B with InStr(). If there is no match to that, there will be no match to anything you would wind up with search an array created with a Split() of B.

You just need to do a brute-force search.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search for a String Match combo Box tsadok VB Databases Basics 0 January 27th, 2008 02:24 AM
Autocount in Tabel A that counts from Tabel B Bjorn2Bjorn Access 4 June 8th, 2007 07:54 AM
template match doesnt match the required node Tomi XSLT 2 March 12th, 2007 06:24 AM
Search for a record using a form a_wahab Access 6 September 1st, 2006 12:03 PM
code to search a record Rudner VB Databases Basics 1 November 17th, 2004 11:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.