cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Illuminator7532
Engaged Sweeper
I would like to do a query of computers that are in a certain OU, how do I do this ?

Thanks in advance !
13 REPLIES 13
paprita
Champion Sweeper
I need the same function but with the possibility of OU choose ... because I don't need "Software search" in digital dashboard, is it possible to have a query to put somewhere in order to have "Search by OU" instead of "Software search"?
Hemoco
Lansweeper Alumni
paprita wrote:
I need the same function but with the possibility of OU choose ... because I don't need "Software search" in digital dashboard, is it possible to have a query to put somewhere in order to have "Search by OU" instead of "Software search"?

This will be in the next version
Illuminator7532
Engaged Sweeper
Sorry, my mistake, but that doesn't cause the error anyway, so here's the query I use :

SELECT dbo.tblComputerSystemProduct.Vendor, dbo.tblComputers.Computername, dbo.tblComputers.Domain, dbo.tblADComputers.OU, dbo.tblADComputers.Lastchanged
FROM dbo.tblADComputers INNER JOIN
dbo.tblComputers ON dbo.tblADComputers.Computername = dbo.tblComputers.Computername
WHERE (dbo.tblADComputers.OU = 'My OU')

So when I run this (of course I fill in the correct OU), I get the error :

The multi-part identifier "dbo.tblComputerSystemProduct.Vendor" could not be bound.
Illuminator7532 wrote:
dbo.tblComputerSystemProduct.Vendor" could not be bound.

Could you post the outpout of "select * from tblcomputersystemproduct" please
(one or 2 lines is enough)
Hemoco
Lansweeper Alumni
You seem to be missing a "dbo." before tblComputerSystemProduct.Vendor
Illuminator7532
Engaged Sweeper
SELECT tblComputerSystemProduct.Vendor, dbo.tblComputers.Computername, dbo.tblComputers.Domain, dbo.tblADComputers.OU, dbo.tblADComputers.Lastchanged
FROM dbo.tblADComputers INNER JOIN
dbo.tblComputers ON dbo.tblADComputers.Computername = dbo.tblComputers.Computername
WHERE (dbo.tblADComputers.OU = 'My OU')
Hemoco
Lansweeper Alumni
Could you post your query please.
Illuminator7532
Engaged Sweeper
Thanks for your reply, but I get this error :

The multi-part identifier "dbo.tblComputerSystemProduct.Vendor" could not be bound
Hemoco
Lansweeper Alumni
You need table "tblComputerSystemProduct" instead