Jump to content

Assets Database


Joanne

Recommended Posts

Hello,

I'm trying to export the h_cmbd_assets so i can import into an SQL database so that going forward my discovery tools can auto update the SQL database and then I use the import tool exe tool to update the hornbill CMDB

 

I know there is a 10k limit and i have roughly 16k in there so thought i would split the export, but there seems to be an issue with the primary key. Even ordering by the PK does seem to work, have attached ss and you can see that asset 999 appears in the middle of the higher numbers.

1128794698_AssetsOrderIssue.thumb.PNG.e9d03c0acf232455f0dc5cbfc8fdb3c1.PNG.

 

 

would be very grateful for a response.

 

Link to comment
Share on other sites

@Joanne

Does this work? Change the order by to...

ORDER BY CAST(h_pk_asset_id AS INTEGER) desc

the Asset ID field I believe is varchar meaning it can contain numbers and text.

The above command (hopefully it's the right syntax) will convert the h_pk_asset_id column into the Integer format. The ORDER BY command can then sort it in number order.

I hope this works.

Thanks,

Samuel

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...