[turba] where statements

Adam Tauno Williams adam at morrison-ind.com
Thu Mar 6 07:50:09 PST 2003


>I have been using Turba 1.1 and have just been testing 1.2. It's a great
>contact manager and fits perfectly with out own custom apps.
>I use Turba to connect to another database and have mapped an employees table
>to a shared 'Staff Addressbook' in Turba.
>Only problem is that the table I am linking to has people that I don't want
>to list. 
>Is there any provision for a WHERE within an SQL driven addressbook ?
>eg: WHERE employees.active = 1;
>I have had a look around but can't seem to find a clean way to implement
>this..
>A WHERE would also be handy to create lists or sub address books..
>eg: 'Some State Address Book' WHERE employees.state_id = '2';
>Any ideas would be most welcome as we're currently displaying staff who no
>longer work in the organisation..

We have much the same issue, presenting information via Turba from sources that
where not originally intended to be "address books".

What you describe is easily accomplished at the RDBMS level through thr use of a
view.

CREATE VIEW v_turba_sacustomer
   (customer_id, customer_name, phone, fax, address)
  AS select cust_id, customer_name, sa_phone, sa_fax,
            trim(sa_address1) || " " || trim(sa_address2) 
              || " " || trim(sa_city) || " " || trim(sa_state) 
              || " " || trim(sa_zipcode)
       from sacustomer
      where status = "A";


More information about the turba mailing list