Custom query to list branch office

Custom query to list branch office

Hi,

I am not an SQL expert and I need to modify the query:

select InvComputer.CAPTION as 'Computer Name', InvComputer.DESCRIPTION as 'Computer Description',InvGroups.NAME as 'TeamViewer ID' from InvComputer
inner join InvComponent on InvComputer.COMPUTER_ID = InvComponent.COMPUTER_ID
inner join InvGroups on InvComponent.COMPONENT_ID = InvGroups.COMPONENT_ID
where InvGroups.DESCRIPTION like '%TeamViewer ID%'

I need to add the Branch Office to the listing.  I found:

BranchOfficeDetails.BRANCH_OFFICE_NAME as 'Remote Office'

and added it to the script  just after ... Description', but received an "unknown column in field list" error message.

I am sure I have not defined the correct variable and not the correct database but I cannot find the list of fields for the SQL database(s) that can be used in the query.  Where do I need to look for them and can you provide the correct query for "remote office" for each computer.

I do not have direct access to the server SQL database.

Thank you,

Mike



























                  New to ADSelfService Plus?