Dave,
I've copied the SQL from our View (as is it can simply be run in the database - or prefix the SQL with "Create view as <my View Name>" and it will create the view in the database that can be imported. I added a comment - the view selects a few custom attributes we have added to the Configuration Item object (so - you just need to adjust which columns from the CI table you have and want in the result set. The only real trick in a Union is that the same columns and order of the columns need to be in both selects).
* The SQL looks for specific CI Classes. In our case we have 2 LDMS core servers that feed our workstation CMDB. So the SQL limits the view to these devices. You could of course expand - perhaps you want tour Cell Phone CI type in the same view.
* I believe all the columns are OOTB - except for on the main cf_config_item table (there I know we added usr_ponumber - maybe others. In the database just look at this table and decide which columns you want in the query.
* I assume you know how to add this in the Data Connection - you are just pointing to your LDSD database - and you reference the view by whatever name you give it.
Terry
SQL:
SELECT
-- Note: Some of the selected attributes are custom added PONum for example) - modify per you Org needs.
-- 1st SQL pulls all PC's where there is a linked User
'Assigned' AS PC_Is_Assigned, usr.tps_name AS AD_LogonID, tps_title AS User_Name,
disp.usr_title AS CI_Status, ci.cf_title AS SerialNumber,ci.usr_serialnumber AS Computer_Name,
ci.usr_ldmscore, ci.usr_model, ci.usr_manufacturer, ci.usr_assettag, ci.usr_ponumber, ci.usr_acquisitiondate,
ci.usr_id2 AS InventoryLoc, ci.cf_current_version_guid
FROM cf_config_item ci, cf_user_config_item assoc, tps_user usr, usr_cidisposition disp
WHERE ci.cf_guid IN (SELECT cf_config_item_guid FROM cf_user_config_item)
AND disp.usr_guid = ci.usr_cidisposition
-- Class Types below are limited to Workstations (each LDMS Core server interfaces to a unique CI Type)
AND ci.cf_class_type_guid IN ('BF582264-76D3-41E9-BF22-6C305E192353', 'EB75D7B9-35D4-4A06-A00E-BF9B9C0991BC')
AND ci.cf_guid = assoc.cf_config_item_guid
AND usr.tps_guid = assoc.cf_user_guid
UNION ALL
-- 1st SQL pulls all PC's where there is no linked User
SELECT
'UnAssigned' AS PC_Is_Assigned, NULL AS AD_LogonID, NULL AS User_Name,
disp.usr_title AS CI_Status, ci.cf_title AS SerialNumber,ci.usr_serialnumber AS Computer_Name,
ci.usr_ldmscore, ci.usr_model, ci.usr_manufacturer, ci.usr_assettag, ci.usr_ponumber, ci.usr_acquisitiondate,
ci.usr_id2 AS InventoryLoc, ci.cf_current_version_guid
FROM cf_config_item ci, usr_cidisposition disp
WHERE ci.cf_guid NOT IN (SELECT cf_config_item_guid FROM cf_user_config_item)
AND disp.usr_guid = ci.usr_cidisposition
AND ci.cf_class_type_guid IN ('BF582264-76D3-41E9-BF22-6C305E192353','EB75D7B9-35D4-4A06-A00E-BF9B9C0991BC')