The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting CI Childs with SQL Query

SOLVED
Go to solution
Highlighted
Erik Weber
Occasional Contributor

Getting CI Childs with SQL Query

Hello,

I'm trying to export some data from the ServiceDesk database into another system and I've come pretty far but I'm stuck at fetching a configuration item's childs. (not relations, but childs).

Anyone that can point me to the right table/view that hold such information ?

While I'm at it, is there some sort of documentation available that describes the Database structure?
8 REPLIES
David_999
Regular Collector

Re: Getting CI Childs with SQL Query

Hello

Which version are you running?
Erik Weber
Occasional Contributor

Re: Getting CI Childs with SQL Query

5.1
David_999
Regular Collector
Solution

Re: Getting CI Childs with SQL Query

I use access to run reports against the database

here is the SQL statement

SELECT sd51_user_cdm_configuration_items.cit_searchcode, sd51_user_cdm_configuration_items_1.cit_searchcode INTO [Related all]
FROM sd51_user_cdm_configuration_items AS sd51_user_cdm_configuration_items_1 INNER JOIN (sd51_user_cdm_configuration_items INNER JOIN sd51_user_sd_cicomponents ON sd51_user_cdm_configuration_items.cit_oid = sd51_user_sd_cicomponents.cic_cita_oid) ON sd51_user_cdm_configuration_items_1.cit_oid = sd51_user_sd_cicomponents.cic_citb_oid;


I also attached a screen shot of the design view.

Erik Weber
Occasional Contributor

Re: Getting CI Childs with SQL Query

Thanks, I'll take a look tomorrow when I'm back at work :-)
Erik Weber
Occasional Contributor

Re: Getting CI Childs with SQL Query

Thanks a lot, seems to do the trick :-)

Erik Weber
Occasional Contributor

Re: Getting CI Childs with SQL Query

Just a quick follow-up, is there any reason that I don't get any Network Devices with that Query ?
David_999
Regular Collector

Re: Getting CI Childs with SQL Query

Hello

Glad it worked. Not sure why the network devices aren't showing up. Unless they are in a different table. They should be in one of the tables that start with sd51_user_cdm_configuration_items_x_sd_1 thru sd51_user_cdm_configuration_items_x_sd_18

Sorry I can't be more help
Erik Weber
Occasional Contributor

Re: Getting CI Childs with SQL Query

Oh, forgot to update this. I found the error, I was getting the IP-address from another table, and the network devices didn't have any IP's registered and thus didn't exist in that table.

(Setting an IP on them fixed it)

Guess I have to change the query into a nested one (some day..)
//Add this to "OnDomLoad" event