I´m not sure if i understood clearly.
If you want to list the area and all of companies near it, you could do it:
select
a.AreaName as Area,
group_concat(c.CompanyName) as Companys
from
AreaCompanys a_c,
Area a,
Company c
where
a_c.AreaID=a.AreaID and
Neil Tompkins wrote:
Hi
I've the following tables
(holds a list of companies)
TableName:Company
CompanyID (int)
CompanyName (varchar)
(holds a list of areas)
TableName:Area
AreaID (int)
AreaName (varchar)
(holds a list of what areas are near to what companies),
You are totally right!
Harald Fuchs [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
In article [EMAIL PROTECTED],
Timon Berkowitz [EMAIL PROTECTED] writes:
Hi there,
Sorry for being a little bit confusing, but de criterias has to be AND.
So it has to be like this:
- all
I finally got it working like I wanted it :-)
SELECT DISTINCT t1.softid,
IF( t1.nameofcd LIKE '%test%' OR t2.nameofsoftware LIKE
'%test%', t1.nameofcd, '') AS nameofcd,
IF( t2.nameofsoftware LIKE '%test%', t2.nameofsoftware,
'') AS nameofsoftware
Hi there,
I have tried that query it works, but not good enough
When you add in Table2 another row with softid 1 and without the string 'test' in it
like this :
softid| nameofcd
1test cd 1
2utils cd 1
3test cd 2
4
it in your result?
PB
- Original Message -
From: Timon Berkowitz
To: [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 12:34 PM
Subject: Re: Difficult query and am kinda stuck how to continue can
someone help?
Hi there,
I have tried that query it works, but not good enough
=2
does not contain 'test', do you want it in your result?
PB
- Original Message -
From: Timon Berkowitz
To: [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 12:34 PM
Subject: Re: Difficult query and am kinda stuck how to continue can
someone help?
Hi there,
I
]
Sent: Tuesday, March 30, 2004 12:34 PM
Subject: Re: Difficult query and am kinda stuck how to continue can
someone help?
Hi there,
I have tried that query it works, but not good enough
When you add in Table2 another row with softid 1 and without the string
'test' in it like
What I ment is this :-)
Table1 consists out of the following fields and data
+--++
| softid | nameofcd |
+--++
| 1 | test cd 1 |
| 2 | software cd 2 |
| 3 | software cd 3 |
| 4 | test cd 2 |
On Mon, 4 Nov 2002, Alexander Newald wrote:
Hello,
I have a table with only ips in it. I want to get all networks the ips
belong to:
Example:
123.123.123.1
123.123.132.2
123.123.123.3
1.1.1.4
1.1.1.5
1.1.1.6
12.12.12.1
12.12.12.2
12.12.12.10
The result should be:
Or, you could use distinct and substring_index instead of my last convoluted answer :)
-Original Message-
From: Kip Turk [mailto:kipt;wcc.net]
Sent: Monday, November 04, 2002 4:17 PM
To: Alexander Newald
Cc: mySQL Mailing Liste
Subject: Re: Difficult query
On Mon, 4 Nov 2002
you might also try this:
select substring(someField, 1, 6),
count(substring(somefield,1,6
from theTable
group by substring(someField, 1,6)
i tried it in corereader and it seemed to do what
you want.
Hello,
I have a table with only ips in it. I want to get all networks the ips
Alexander Newald wrote:
I have a table with only ips in it. I want to get all networks the ips
belong to:
If you always use 24 bit netmasks, then the other solutions given should
work just fine. If you're working with arbitrary sized networks though,
you might want to store the IP
* Henning Sprang
Now I want to create a query to get all task_id's which one given User
isn't already assigned to. I tried a lot of things, Joined in every
direction and so but do not come to my result.
The problem in this situation is that you want to join with records that are
not there. I
14 matches
Mail list logo