473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Combine data rows on condition and delet if null

Hi all of you aswome access gurus..
I`m finding myself migrating to access and learing all its useful features but i have something that is stomping me that might seem simple to some of you

I have 2 tables TblMTD and TblDuplicates_Temp but will focus on the second one (TblDuplicates_Temp)

This table is a result from a query that finds the duplicate accounts from the Rawdata in TblMTD

The TblDuplicates_Temp has the following colums

Emplnum,EmplName,Skill,Call_Center,Manager,Calls

note that
skill=what that employee sells
call center =where they are located

In this duplicate table the only difference in records is that sometimes and emplyee number appears twice but one of his records has calls and another one does not.

like this

Emplnum,EmplName,Skill,Call_Center,Calls,attempts, promo,stat
11153,Jon Do,internet,london,123,5,null,temp
11153,John Do,cellular,india,0,9,low,perm

What i would need is to COMBINE same employee number records but to KEEP ONLY the SKILL,CALLS,STAT (maybe others in the future)of the employee number with the most calls

like this (as per the data above.

Emplnum,EmplName,Skill,Call_Center,Calls,attempts, promo,stat
11153,Jon Do,cellular,london,123,9,null,temp


AND..... to delete all the records for THAT emploYee if there are no call (i do not want to keep those records if they have some emplyees have 2 records but no calls)

Thank you soooo much in advance...i am simply stuck at that point
Nov 10 '11 #1
1 1531
NeoPa
32,556 Expert Mod 16PB
I would start with ensuring that [TblDuplicates_Temp] has an [ID] field when it's created. That's easily done simply by specifying an AutoNumber field in the design.

Actually, wouldn't a better and simpler idea be to delete any non-qualifying records from this table beforehand (or just disqualify those records before adding them in when the duplicates are detected). With the data left in the table only that which you require the problem is simplified away no?
Nov 11 '11 #2

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

Similar topics

1
by: Valerie | last post by:
Hi everyone, I really appreciate if anyone could help me with this tricky problem that I'm having. I'm looking for a sample script to combine data in multiple rows into one row. I'm using...
0
by: Vamsi Polavarapu | last post by:
Hi, I have two Data Tables,now i want a collection of only those rows which are different in either one.Can any one suggest me a way to compare two Data Rows. Both the Data Tables are identical...
1
by: authorking | last post by:
How could I add data rows into a datagrid controll so that I can edit my data in the data rows.
1
by: Lars E. | last post by:
Hi all. I am trying to combine data from 2 tables in one datagridview. I have tables: "Customer" and "CustomerContact". I want to display Customer information (displaying all fields in...
4
by: Iprogramforlawyers | last post by:
I need to take any amount of rows and turn them into one single row. I'm exporting some data from sql. The program its going into only has one note field. I've used UNION and those types of...
7
by: Mintyman | last post by:
Hi, I'm working on a system migration and I need to combine data from multiple rows (with the same ID) into one comma separated string. This is how the data is at the moment: Company_ID ...
1
by: ktang3227 | last post by:
Hi all, I have a table which list all the different product# and quantity of the product in each row. But for some reason, some of the product splites into 2 rows. For example; Product A has...
0
by: ajitha123 | last post by:
I've 2 rows similar with only 1 or 2 columns different. now i need to combine these two rows in the excel sheet with comma separating that two column plz help me
1
by: hlajeunessse | last post by:
Hi! I have a table looking like (username) (account number) (start date) (end date) (product) wich I can have up to 4 lines for the same client. I wist to transfert those lines into a new...
10
aas4mis
by: aas4mis | last post by:
I have a table with a deviceid, attribute type, and attribute value. There are many attributes for a single device id. I want my query to retrieve a single device id with multiple attribute values....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.