473,396 Members | 1,940 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,396 software developers and data experts.

Count part of the string value reappearing in many records of a field in simple query

in a select query field 'FullName' data comprises of FirstName, MiddleName,LastName and PetName. Now part of the full name is reappearing as firstName or MiddleName or LastName in different sequence in more than one record. I want to count one such specific part of the FullName in all the records of this field.
May 4 '14 #1
4 1299
jimatqsi
1,271 Expert 1GB
learner1,
Welcome to Bytes. We'd all like to help you but we cannot know anything about your code that you don't tell us or show us. Help us help you by showing us what you have done.

In the query editor go into SQL view mode. Copy what you find there and paste it here. Be sure to click the [Code/] button and paste your code between the tags.

Jim
May 4 '14 #2
Thanks Jim,

Code for joining the different fields is as given below,however now I am interested in as to how any part in this combined field can be counted .

Expand|Select|Wrap|Line Numbers
  1. SELECT Table1.ID, Table1.FirstName, Table1.MiddleName, Table1.LastName, Table1.PetName, " " & [FirstName] & " " & [MiddleName] & " " & [PetName] AS FullName
  2. FROM Table1;
  3.  
May 4 '14 #3
jimatqsi
1,271 Expert 1GB
A new question is a new question in a new thread. Please start a new thread if you are no longer seeking help for the same problem. Please take the time to make a complete and clear request. Brevity is not helpful, we need to understand the problem fully.


Jim
May 4 '14 #4
NeoPa
32,556 Expert Mod 16PB
As each part is held in separate fields anyway, the counting would be done for whichever field you're interested in. The function for counting in SQL is Count(). You should read up what this does and how to use it from the help system or on the web.

It's fairly basic stuff, but your question has so little detail that helping you further at this stage is not possible without further back and forth which should not be necessary - and isn't when you expend a little more effort asking the question clearly in the first place.

I know this sounds like criticism, and it is a little, but in reality we do understand that getting this right early on is very rare. We just think it's a good idea to make you aware of this because going forward with new questions you will benefit greatly from the extra effort up front preparing a question we can answer. Obviously it helps us too, but at the end of the day we have loads of other questions we can look at if yours is unworkable.
May 5 '14 #5

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

Similar topics

1
by: KLAU | last post by:
I have a field that retrieves information from an expression in a query. I have used a DLookup function to get the calculated field from the query. However, the relationship is 1-to-many so one...
3
by: Matthias Haffke | last post by:
Ok, this is a tricky question for the pro's: My access sheet: line, id a, id b, val% ---------------- 1, a, ac, 0.04 2, a, ac, 0.28 3, a, ac, 0.015 4, a, ac, 0.205
10
by: Thelma Lubkin | last post by:
My form/subform combination that allows user to display 'ColorSet' records, move to other records via a selector, to add,delete, and edit them, and to manage the related 'Color' records from the...
5
by: valglad | last post by:
Hi, The question below was posted about 4 years ago and noone was able to answer it back then. I have virtually the same type of problem so would appreciate if anyone can help. Thanks ...
7
by: Ivan Marsh | last post by:
Hey Folks, I'm having a heck of a time wrapping mind around AJAX. Anyone know of a simple, straight-forward example for pulling a simple query from mysql with PHP using AJAX? As I...
2
by: jmarr02s | last post by:
I don't know what I am doing wrong I get duplicate records when I query Here is my SQL query code: SELECT Utilization_T.Facid, Utilization_T.Year, Utilization_T.Beds, Utilization_T.LicBeds,...
8
by: Gem | last post by:
Hi I'm struggling with a query returning too many records. I have 3 related tables. tblPatients tblOperations tblTargets Each patient in tblPatients can have more than one operation...
8
by: boss1 | last post by:
hi all i m using oracle9i and php4 to developa webbased application. i wrote the code for auto increment in primary key field.but now i want to add a string value with that increment field when a...
3
by: brittb | last post by:
Hi, I'm trying to create report that will have calculated values based on the number of returned records for a query. The query returns records based on the date, so the number of records returned...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
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,...

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.