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),
TableName:AreaCompany
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),
TableName:AreaCompanys
CompanyID (int)
AreaID
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
a_c.CompanyID=c.
To:
Sent: Sunday, January 15, 2006 10:21 AM
Subject: A difficult query- urgent for me
Dear Friends,
I have a problm, try to solve that.
Actually there is a table with columns a and b .
So i want if a contains a particular word than a's value should return else
'b' value should re
On 1/15/06, [EMAIL PROTECTED] wrote:
>
> Actually there is a table with columns a and b .
> So i want if a contains a particular word than a's value should return else
> 'b' value should return.
SELECT
CASE
WHEN a = 'Good' THEN a
ELSE b
END
FROM
table
Jochem
Dear Friends,
I have a problm, try to solve that.
Actually there is a table with columns a and b .
So i want if a contains a particular word than a's value should return else
'b' value should return. And there must be one and only one column
returning. I have mysql 4.x and i think the logic will be
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
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 li
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 |
+
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
When you add in Table2 another row with softid 1 and without the string
matches the string 'test'
>
> so if your table2 had (6, 2, 'test'), where table1.nameofcd for softid=2
> does not contain 'test', do you want it in your result?
>
> PB
> - Original Message -
> From: Timon Berkowitz
> To: [EMAIL PROTEC
s 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 have
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
4bac
Hi there,
I have a hard question, don't know if its possible to solve my query.
I have set up two tables like this
Table1:
softid (integer) (unique)
nameofcd (string)
softid| nameofcd
1test cd 1
2utils cd 1
3test cd 2
4b
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 addresse
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
>
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, 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 shoul
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:
123.123.123.0
1.1.1.0
12.12.12.0
Instead of converting on matching row (f
* 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.
Hy,
I have a question on how to build a query.
scenario:
I have three tables,
Users:
--
user_id INT(32),
username CHAR(64)
Tasks:
--
task_id(INT32),
task_name CHAR(64)
Authorization:
--
user_id INT(32),
task_id INT(32)
some details of database design are neclected here.
>hi all together!
>
>i'm turning to your mailinglist as last chance to find s.o. helping
>me with my problem.
>
>the situation is as follows:
>
>i got a table on a mysql-database, queriing it by php4. the table
>consists of all planets of the planetarion.com-system. these
>information consists
Hello.
On Thu, Jun 28, 2001 at 10:48:23PM +0200, [EMAIL PROTECTED] wrote:
[...]
> the user inserts some wished dates (the lowest score, the searched
> planet may have, the highest, the highest number of roids and the
> lowest..) and the number-interval in wich the _galaxy-score_ may be
> included
hi all together!
i'm turning to your mailinglist as last chance to find s.o. helping me with my problem.
the situation is as follows:
i got a table on a mysql-database, queriing it by php4. the table consists of all
planets of the planetarion.com-system. these information consists of each 3
c
-
From: "Weevil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 4:19 PM
Subject: Mysql difficult query. Need help!
> Hi.
>
> I'm having some problems with formulating a SELECT statement to do the
> following:
>
> I have a databas
Hi.
I'm having some problems with formulating a SELECT statement to do the
following:
I have a database with one column of names with certain tags bounded by
square brackets, and a price column as well. The database looks something
like this:
ITEMPRICE
Shirt [Lar
26 matches
Mail list logo