473,463 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Merging and validating data

Hi Guys

I am trying to do something reasonably complex and need a bit of help. I have a table (tbl_DW_Twitter_Location_Parse) with these columns

ID, items, twitter_screen_name, location_orig, time_zone_orig, location_result, Parsed_Date

The twitter_screen_name is foreign key to a table called tbl_Twitter_Profile, so in tbl_DW_Twitter_Location_Parse it can appear multiple times. The latter table basically stores the location results of a location parsing function for each twitter_screen_name and could have up to around seven rows per screen name that can be either (field = location result) a country, region or city. You can get more than one country, city or region per screen name..

Here is an example below
ID Location twitter_screen_name Location_Result
1 Atlanta catbugle City
3 GA catbugle Region
5 US catbugle Country
6 Georgetown catbugle City

What I need to do is

1. Validate each entry against the other entries for the same twitter_profile name by comparing combinatins against a master reference table that contains combo of country,region and city in a single row.. for example taking the City Atlanta here, and seeing whether it is assocaited with the region and the country for the twitter_screen_name in question (i.e. Atlanta and Region GA and Country = US - does this combo exist on the master ref table, if not does just Atlanta and Region or Atlanta and Country exist?)

2. I then need to merge the multiple rows into a single row that would contain columns with the validated locations

twitter_screen_name, city, region, country

3. If we have a city and region that is valid but not for the country, then we need to pull back alternative country from the master ref table that contains that combination of city / region and drop the invalid country...

Thanks
Apr 29 '10 #1
0 909

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Klatuu | last post by:
Whew, I've struggled my way through figuring out how to use XML to transport data..now I can imagine what having a baby is like :) But, I'm stuck now. I generate the XML (single table, no...
3
by: Patrick | last post by:
I have got 2 XML documents, both of which conform to the same XSD Schema, which define possible optional elements. The 2 XML documents contain 2 disjoint set of XML elements. What is the best,...
2
by: Emmett Power | last post by:
Hi, I have an Access table with a number of records which refer to the same person but with data in different fields. So for example the table would look like this: Name..............Field...
1
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word...
15
by: PRadyut | last post by:
In this code it throws a runtime error on a code access violation . On the line z->data=p->data; while (p!=NULL && q!=NULL) { if (*s==NULL) {
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
3
by: Sanjib Biswas | last post by:
Hi All, I am looking for XML merging for the following scenarios. I want to load both the input files and show in the tree viewer and highlight the differences. Now its up to the user to select...
4
by: easoftware | last post by:
I am using VS .Net 2003 and VB. I have an app with one parent and two Mdi child forms. I need to validate data in the Mdi form. The Form.Validating event works when I try to close a Mdi form,...
7
by: Jon Vaughan | last post by:
I have 2 datasets , one returned as a dataset from a webservice and one created client side form the same stored procedure that is returned from the webservice. I then try and merge the data, but...
31
by: louishong | last post by:
3rd time posting this as the first two simply disappeared! Here's the issue: We currently run an Access application in the West Coast for tracking resource centric data. For those located in the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.