Tema: Re: sql select salygoj yra masyvas
Autorius: kantas
Data: 2009-02-20 13:21:05
na tavo uzklausa grazina lygiai 0 reikshmiu, kad ir be klaideles :) 
anyway the problem is solved. thnx again 

On Fri, 20 Feb 2009 10:47:25 +0200, Mindaugas J. wrote:

> Na tai smulki klaidelė liko, reikia "lent.id2"  pakeisti į "lent2.id2".
> 
> -Mindaugas J.
> 
> "kantas" <asd@asd.lt> wrote in message
> news:gnk4ok$sff$3@trimpas.omnitel.net...
>> nelabai gavosi su tavo siulytu variantu. bet turiu kita solutiona,
>> kuris atrodo mazdaug taip:
>> select id, name from lent1 where not exists (select id2 from lent2
>> where lent1.id = lent2.id2 and lent2.date = $date)
>> 
>> thnx
>> 
>> On Thu, 19 Feb 2009 12:40:37 +0200, Mindaugas J. wrote:
>> 
>>> wtf.... ?
>>> 
>>> SELECT lent1.id,
>>>     lent1.name
>>> FROM lent1
>>>     LEFT JOIN lent2 ON lent1.id = lent.id2
>>> WHERE lent2.date = '$date'
>>>     AND lent2.id2 IS NULL
>>> 
>>> -Mindaugas J.
>>> 
>>>