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

Problem contructing SQL Request for multiple lines

In order to migrate to a new ERP system i need to recover data from an old tkSQLite database. I am not an SQL expert and am having problems :

I have 2 tables:

Table1
person_id, name, firstname

Table2
person_id, telephone_number



Each person can have several telephone numbers in Table2. What I need to do is select each person and their telephone number(s) on 1 row.



For example if in Table1 I have

1, John, Mahony


and in Table2 I have

1, +353895604
1, +353234879
1, +668497348


What I need is a request which will give me:

John, Mahony, +353895604, +353234879, +668497348


If anyone knows how to do this I would be very greatful,

Thank you,
Kevin
Feb 17 '11 #1
1 1379
mwasif
802 Expert 512MB
Use GROUP_CONCAT().
Feb 17 '11 #2

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

Similar topics

14
by: JStrauss | last post by:
Hello, Can anybody give me some tips on the best and/or easiest way to display multiple lines in a field. The data is collected from a "textarea" field when the form is submitted, and I want to...
2
by: George | last post by:
Dear colleagues, I refer to your help with specific graphic problem. It is necessary to create a viewfinder in graphic application. It seems that the algorithm is simple: just draw lines in...
1
by: Loading name... | last post by:
hey asp.net 2.0 In my db (sql server 2005) I have a record which consist of multiple lines: "HEY THIS IS A TEST OF MULTIPLE LINES"
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
0
by: chitta | last post by:
Hi I have a problem when i am looping on multiple lines. the question as follows If OrderProductLineItem (DocType='OrderCreate'/'OrderChange') < OrderProductLineItem...
3
by: Bodyloss | last post by:
Hey all Ive ran into a bit of a problem when trying to parse multiple lines of javascript whitch are returned from an ajax request. On the main page where the request orginates, i have a <div...
3
by: jackson.rayne | last post by:
Hello, Another newbie question here. Let me explain my situation first. I have bought a 3rd party tool that runs a PHP script and gives me some HTML code which I can directly use in my...
7
by: chaitanya83 | last post by:
How to select text which is in multiple lines on clicking more than twice? I have scenario like this: eg:-6118051 Non-Receipt Per web, delivery incomplete. Request trace and driver followup...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...

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.