Subject | RE: [firebird-support] Re: Sub select with function max problem |
---|---|
Author | Bayu |
Post date | 2004-02-20T09:04:06Z |
Svein,
Allready change and not work.
If you don't mind, i will sent sample data to your email address
Thanks
bayu
Allready change and not work.
If you don't mind, i will sent sample data to your email address
Thanks
bayu
> -----Original Message-----
> From: Svein Erling [mailto:svein.erling.tysvaer@...]
> Sent: Friday, February 20, 2004 3:52 PM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Re: Sub select with function max problem
>
>
> Use aliases EVERYWHERE. I.e. change to
>
> Select d.deptid, d.deptcode, d.deptname, d.deptno
> from deptsections d
> where d.deptid = (
> Select first 1 a1.deptid
> from atdhistory_temp a1
> where a1.empid = :empid_2
> and a1.workdate = (
> Select max( a2.workdate )
> from atdhistory_temp a2
> where a2.workdate between :mulai and :mulai
> + 6
> and a2.empid = :empid_2
> )
> )
> into :deptid_2, :deptcode_2, :deptname_2, :deptno_2;
>
> I don't know whether this is your problem or not, but it is a good
> habit to use aliases and without them I never know how Firebird reads
> my query. Report back if this solves your problem, or if we have to
> look closer at your code.
>
> HTH,
> Set
> - I support Firebird, I am a FirebirdSQL Foundation member.
> - Join today at http://www.firebirdsql.org/ff/foundation
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>