I'm trying to import parent child relationships that have been created via excel spreadsheet. The spreadsheet was created using a dump with all the search codes for our CIs. We match up parent child relationships 1:1 like:
I've already built the import mechanism and it appears to be working. The problem is, when I try to import, it's looking for the OIDs, not the search codes and this is causing datatype conversion errors from the database (and rightfully so). Does anyone know of a way to import parent/child using search code vs. OID?
Yes, I have defined that relationship. When I run the import however, it gives me an error:
JDBC error 8114: [SVR2K3TEST\SERVICEDESK]Error converting data type nvarchar to numeric., SQL state: 01000 for query: SELECT T1.cic_oid AS C0 ,T1.cic_lockseq AS C1 FROM itsm_cicomponents T1 WHERE (T1.cic_cita_oid = ?) AND (T1.cic_citb_oid = ?) Values: FTP ACE1java.sql.SQLException: [SVR2K3TEST\SERVICEDESK]Error converting data type nvarchar to numeric.
This actually makes sense to me, because the table I'm importing to doesn't have search code in it, just foreign keys to the actual CIs. I'm guessing if I put the OIDs in there instead this will go w/out a hitch, but it's not preferred. Also, this is something of a two step process where users can import new CIs and then the parent/child relationships for them, so we may not even know the OIDs until after the initial import process. Besides, OIDs are hardly user friendly.
If the columns contain "OIDS" then its expected that the import will fail, since you are mapping decimal(18,0) to searchcode and service desk doesn't want searchcode to start with a digit. If you concatenate a character in the beginning of the OID then the import will be successful.