That did the job. Thanks.
Am new to SQL, does not even know that there exists an Operator called OVERLAPS.
Thanks Richard
../rssrik
--- On Tue, 17/3/09, Richard Huxton wrote:
From: Richard Huxton
Subject: Re: [SQL] SQL to Check whether "AN HOUR PERIOD" is between start and
end timestamps
To:
Wei Weng wrote:
> I made a mistake in the queries:
>
> They should be
>
> update T set t1 = b.aa FROM (select COUNT(1) as aa FROM D WHERE D.da =
> 1) as b where tkey = ;
> update T set t2 = b.aa FROM (select COUNT(1) as aa FROM D WHERE D.da =
> 2) as b where tkey = ;
> ...
> update T set t10 = b.
first, sorry for the subject.
I started editing the body and I forgot the subject looked nearly
meaningless.
I solved this using a view on
catalog_promosimpleitem
and
catalog_promosimple
that just take out the record I'm interested into.
If no record, the left join on the view should make it work