Subject | Re: MS SQL to FireBird |
---|---|
Author | polash26 |
Post date | 2005-11-24T11:10:22Z |
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
understand that query will delete data from T1, but not too sure
about that "where" clause ??? This is one of the dotnetnuke store
procedure for MS SQL. I'm looking for equivalent FireBird query.
<svein.erling.tysvaer@k...> wrote:
>wrote:
> --- In firebird-support@yahoogroups.com, "polash26" wrote:
> >
> > --- In firebird-support@yahoogroups.com, "Miroslav Penchev"
> > >MS
> > > On Sun, 20 Nov 2005 12:13:27 +0200, polash26 wrote:
> > >
> > > > What is the equivalent query in FireBird for the following
> > > > SQL queryb.Recent ).
> > > >
> > > > DELETE FROM T1
> > > > FROM T2 b
> > > > WHERE
> > > > ( SELECT COUNT(*) FROM T1 a WHERE a.ID = b.ID ) > b.Recent
> > > >
> > > > Thanks for any reply.
> > > >
> > > >
> > >
> > > What should do that DELETE?
> >
> > Delete will delete data from T1, according to the where condition
> > (WHERE( SELECT COUNT(*) FROM T1 a WHERE a.ID = b.ID ) >
>it
> Like Miroslav, I don't get what you're trying to do, but I do know
> that you cannot have two FROMs after eachother, and that you should
> alias all tables. So try something like:
>
> DELETE FROM T1 T1a
> WHERE
> (SELECT COUNT(*) FROM T1 T1b WHERE T1b.ID = T1a.ID) >
> (SELECT b.Recent FROM T2 b WHERE b.ID = T1a.ID)
>
> Hmm, I've never tried anything like this and have no idea whether
> will work. Nor do I know whether this is what you want to do, butat
> least I hope this helps,Hmm, Even I'm not 100% clear about that MS SQL query, from my
>
understand that query will delete data from T1, but not too sure
about that "where" clause ??? This is one of the dotnetnuke store
procedure for MS SQL. I'm looking for equivalent FireBird query.
> Set
>