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