On 2 Dec 2003 at 7:20, Greg Jones wrote:

<snip> 
>  
> select l.ltsysid,l.lientraknum, c.name from lientrak as l, customer as c
> where l.custsysid=c.custsysid
> and l.ltsysid in (select l2.ltsysid from lientrak as l2 where l2.lientraknum
> like '2003-%')
>  
<snip>
> 

Hi greg

Yopur problem is that you are using a subquery - MySQL 4.0.1.5 does not support 
subqueries - you will need 4.1 for that...

A possible workaround (based on your query above - so please tolerate any mistakes 
:) ) :

select l.ltsysid,l.lientraknum, c.name 
from lientrak as l, customer as c
where l.custsysid=c.custsysid and l.lientraknum like '2003-%'

Actually, having written the above workaround, I am puzzled as to why you would 
need the subquery at all :)...unless of course, above workaround is completely wrong, 
and I have to eat humble pie ....again.....

Rory McKinley
Nebula Solutions
+27 82 857 2391
[EMAIL PROTECTED]
"There are 10 kinds of people in this world, 
those who understand binary and those who don't" (Unknown)

Reply via email to