1 Reply Latest reply on Sep 8, 2010 2:41 AM by Waldy

    Clearing inventory data in Helpdesk

    Rookie

      Anyone know how to savely clear the complete inventory in Helpdesk. I know at least the SPECFAC and SFCxxx tables should be truncated but are there more references to other tables (for example; the CUSTMER table)?  Is there a script available to do this?

        • 1. Re: Clearing inventory data in Helpdesk
          Waldy Employee

          Hi there,

                       the CUSTFAC table links Customers and Inventory.

           

          truncate CUSTFAC_HDW

          truncate GRPFAC_HDW

          truncate OPRFAC_HDW

          truncate SFACSTR_HDW

          truncate SFCDEVIC_HDW

          truncate SFCMAPGU_HDW

          truncate SFCNOTES_HDW

          truncate SPECFAC_HDW

          truncate SFCxxx_HDW (where xxx is 001, 002 e.t.c.)

           

          The SQL statement below will show what tables contain references to Inventory:

           

          SELECT     HDWTABLEID, HDWELEMTID
          FROM         TABLSTR
          WHERE     HDWELEMTID LIKE '%FACL%'

           

          Set the fields to NULL in each of the tables that are returned by the SQL statement that do not appear in the previous truncate statements

           

          ie:  update CALL_HDW set FACLSRN_HDW = NULL, FACLTID_HDW = NULL, LASTFACLSRN_HDW = NULL, LASTFACLID_HDW = NULL