I am trying to use !TabRelation in the following manner:

     #-------------------
     # reterive all notes for this incident ordered by date
     #-------------------
     DBIx::Recordset::Undef ('set');
     $fdat{'!DataSource'}       =  GetDSN();
     $fdat{'!Table'}            = 'note, unanet_employee';
     $fdat{'!Fields'}           = "unanet_employee.first_name || ' ' ||
unanet_employee.last_name as employee_name,note.note_datetime,note.note";
     $fdat{'note.incident_key'} = $incident_key;
     $fdat{'!TabRelation'}      = 'unanet_employee.employee_key =
note.employee_key';
     $fdat{'!Order'}            = 'note.note_datetime';
     $fdat{'!=search'}          = 'ok';
     *noteRS = DBIx::Recordset -> Execute ({%fdat});


Here is the results in the log file of what the select statement looks like:

DB:  Use already open dbh for Nisys05 (id=234, numOpen = 0)
DB:   use cached meta data for note, unanet_employee
DB:  New Recordset driver=Oracle  placeholders NOT supported
DB:  Execute 
DB:  SelectWhere <!Table>=<note, unanet_employee> type = !
DB:  SelectWhere <!Order>=<note.note_datetime> type = !
DB:  SelectWhere <!Filter>=<> type = !
DB:  SelectWhere <note.incident_key>=<10149> type = n
DB:  SelectWhere <!=search>=<ok> type = !
DB:  SelectWhere <!DataSource>=<DBI::db=HASH(0x5048fcc)> type = !
DB:  SelectWhere <!Fields>=<unanet_employee.first_name || ' ' ||
unanet_employee.last_name as employee_name,note.note_datetime,note.note>
type = !
DB:  SelectWhere <!TabRelation>=<unanet_employee.employee_key =
note.employee_key> type = !
DB:  FLUSH Recordset id = 234  DBIx::Recordset=HASH(0x51e5cc0) 
DB:  'SELECT unanet_employee.first_name || ' ' || unanet_employee.last_name
as employee_name,
                     note.note_datetime,
                     note.note 
       FROM note, unanet_employee 
       WHERE (unanet_employee.employee_key = note.employee_key) and 
                    (  (  (note.incident_key = ?)))   
       ORDER BY note.note_datetime  ' bind_values=<10149> bind_types=<3>

I was expecting the following (based on the documentation)

DB:  'SELECT unanet_employee.first_name || ' ' || unanet_employee.last_name
as employee_name,
                     note.note_datetime,
                     note.note 
       FROM note, unanet_employee 
       WHERE  (  (  (note.incident_key = ?)))   and
                     (unanet_employee.employee_key = note.employee_key)
       ORDER BY note.note_datetime  ' bind_values=<10149> bind_types=<3>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to