SQL Problem

Chris Sol <[email protected]> Tue, 18 Feb 2003 12:21:29 -0000
Newsgroups gmane.comp.db.oracle.devel
Message-ID <LYRIS-1796914-878795-2003.02.18-12.18.23--gcdod-oracle#[email protected]>
SQL> --void record check
SQL> select *
  2  from zz_voidrecordst
  3  where ref = '1394';

REF   VOIDSTART VOIDEND   PATH
----- --------- --------- --------------------
1394  08-FEB-99 07-APR-02 PIPE

SQL> --actual transactions
SQL> select vtran_pro_propref,vtran_effective_date,vtran_dr
  2  from   void_transactions
  3  where  vtran_effective_date >= '01-APR-2002'
  4  and vtran_pro_propref = '1394';

VTRAN_PRO_PROPREF         VTRAN_EFF  VTRAN_DR
------------------------- --------- ---------
1394                      01-APR-02        58

SQL> -- LINK:
SQL> select sum(V.vtran_dr) as Total,
  2      Z.REF,
  3      Z.Path
  4  from   void_transactions v, zz_voidrecordst z
  5  where  v.vtran_pro_propref = z.ref and
  6      (v.vtran_effective_date between to_date(z.voidstart) and
to_date(z.voidend))
  7        and v.vtran_effective_date >= '01-APR-2002'
  8      and z.ref = '1394'
  9  group by Z.REF, Z.Path;

no rows selected

Why is the bottom query return no rows?

Chris Sol
Analyst Programmer
IT Development
Genesis Housing Group
Telephone 02085374169


****************************************************************************
The Genesis Housing Group - Email Disclaimer
--------------------------------------------
The information in this email and any attachments is strictly
confidential and may be legally privileged.
It is intended solely for the use of the addressee(s) only. Access to
this email by anyone else is unauthorised.  If you have received this
email in error please notify the sender immediately by return email or
telephone.  Please note that if you are not the intended recipient, you
must not copy, distribute or otherwise act on any part of this email or
it's attachments.
Although we have taken precautions to ensure that this email and
attachments are free from any virus, we would advise you that it is your
responsibility to ensure that this is true when reading or actioning
this email.

---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to [email protected].