Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:58:24+00:00 2026-06-09T14:58:24+00:00

Code | FName | Freq ——————— L1 | Ted | 4 L1 | Frank

  • 0
Code  | FName | Freq
---------------------
L1    | Ted   | 4
L1    | Frank | 
L1    | Ted   | 5
L2    | Ted   | 7
L1    | Jim   | 4
L1    | Ted   | 7
L4    | Ed    | 1
L2    | Ted   | 2
L1    | Frank | 2

Lets say I have a table like that in my database. Would it possible to grab the records in SQL (or grab in SQL then reorganize in another Access query) so that I can get record set that looks like this:

Code | FName | Freq
-------------------------
L1    | Ted   | 4, 5, 7
L1    | Frank | 2
L2    | Ted   | 2, 7
L4    | Ed    | 1
L1    | Jim   | 4

where the different ‘Freq’ numbers are appended together in a list based off ‘Code’ AND ‘Fname’? Order doesn’t matter as long as all the different freqency numbers are in the list. I can assume that for each combination of Code and Fname that there will be distinct, non-repeated frequency numbers (so a combination of ‘L1’ and ‘Ted’ will never have a freq value of 4 more than once)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:58:26+00:00Added an answer on June 9, 2026 at 2:58 pm

    Then you are in luck!

    select code, fname, listagg(cast(freq as varchar(32), ',') within group (order by freq)
    from t
    group by code, fname
    

    I’m not sure what this does with the blank, however.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have about 20 CSV's that all look like this: [email],[fname],[lname],[prefix],[suffix],[fax],[phone],[business],[address1],[address2],[city],[state],[zip],[setdate],[email_type],[start_code] What I've been
I have table tab1 (pseudo-structure) tab1 { fname char(20) code int } I have
I have a following XML code: <Group> <GElement code=x> <Group> <GElement code=x> <fname>a</fname> <lname>b</lname>
I have a PHP file in which I have this code: $descText = $_POST[fname];
Code Currently my code looks like that. $stmt = $this->db->prepare(SELECT m.id, m.from_id, m.to_id, m.subject,
I have the following code snippet. SqlCommand cmd = new SqlCommand(SELECT FName,LName FROM EMPLOYEE_TABLE
I have the following code: if($result = $this->Email->peopleFollowingEmail($follow['User']['email'], $viewer['User']['fname'].' '.$viewer['User']['lname'], $viewer['User']['username'])) { $pf_model->id =
I have PHP 5 code accessing a MyISAM table on MySQL 5 server. The
I have the following JSON structure : { codes:[ { id:1, code:{ fname:S, lname:K
So my problem is that my code would crash when one of it couldn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.